text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use crate::bid::{calculate_liquidated_collateral, calculate_remaining_bid}; use crate::querier::query_collateral_whitelist_info; use crate::state::{ read_bid, read_bid_pool, read_bid_pools, read_bids_by_user, read_collateral_info, read_config, read_total_bids, Bid, BidPool, CollateralInfo, Config, }; use cosmwa...
the_stack
use prolog_parser::ast::*; use prolog_parser::tabled_rc::TabledData; use prolog_parser::{perm_v, temp_v}; use crate::allocator::*; use crate::arithmetic::*; use crate::clause_types::*; use crate::fixtures::*; use crate::forms::*; use crate::indexing::*; use crate::instructions::*; use crate::iterators::*; use crate::t...
the_stack
use crate::common::{Graph, *}; use ordered_float::NotNan; use petgraph::prelude::*; use slotmap::SparseSecondaryMap; use std::{cell::RefCell, convert::TryInto, ops}; use tinyvec::ArrayVec as TinyVec; #[derive(Clone, Copy)] pub struct Array<'s> { node_id: OpNodeId, scope: &'s Scope, } #[derive(Clone, Copy)] pu...
the_stack
use std::{borrow::Cow, mem, ops::Deref, sync::Arc}; use arrow::util::bit_util; use super::ArrowBatch; use crate::{ datastore::{batch::AgentBatch, prelude::*, schema::state::AgentSchema}, proto::ExperimentId, }; type Offset = i32; type LargeOffset = i64; static EMPTY_OFFSET_BUFFER: [u8; 4] = [0, 0, 0, 0]; p...
the_stack
use super::{create_sockaddr, create_socket, vnet_hdr_len, Error as NetUtilError, MacAddr}; use crate::mac::MAC_ADDR_LEN; use std::fs::File; use std::io::{Error as IoError, Read, Result as IoResult, Write}; use std::net; use std::os::raw::*; use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use vmm_sys_util::ioctl::{i...
the_stack
use rexpect::errors::Error; use rexpect::process::signal::Signal; use rexpect::session::PtySession; use rexpect::spawn; use uuid::Uuid; use litex_simctrl::gpio::GpioCtrl; use litex_simctrl::sim::SimCtrl; // Semantic GPIO assignments // const LED0: u64 = 0; // const LED1: u64 = 1; // const LED2: u64 = 2; // const LED...
the_stack
use std::collections::HashMap; use std::sync::Arc; use std::task::Poll; use fuchsia_async as fasync; use fuchsia_zircon::{Duration, DurationNum}; use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender}; use futures::channel::oneshot; use futures::lock::Mutex; use futures::StreamExt; use async_trait::async_tr...
the_stack
use crate::generated::gremlin as pb; use crate::process::traversal::pop::Pop; use crate::process::traversal::step::by_key::{ByStepOption, TagKey}; use crate::process::traversal::step::util::result_downcast::{ try_downcast_group_count_value, try_downcast_group_key, try_downcast_group_value, }; use crate::process::tr...
the_stack
use crate::config::file_lines::FileLines; use crate::config::options::{IgnoreList, WidthHeuristics}; /// Trait for types that can be used in `Config`. pub(crate) trait ConfigType: Sized { /// Returns hint text for use in `Config::print_docs()`. For enum types, this is a /// pipe-separated list of variants; for...
the_stack
use rustc_ast::{ast, ptr}; use rustc_span::Span; use crate::attr::get_attrs_from_stmt; use crate::config::lists::*; use crate::config::Version; use crate::expr::{block_contains_comment, is_simple_block, is_unsafe_block, rewrite_cond}; use crate::items::{span_hi_for_param, span_lo_for_param}; use crate::lists::{definit...
the_stack
use crate::{GlobalAttributes, SvgAttributes}; use dioxus_core::*; use std::fmt::Arguments; macro_rules! builder_constructors { ( $( $(#[$attr:meta])* $name:ident { $( $(#[$attr_method:meta])* $fil:ident: $vil:ident, ...
the_stack
use super::{BitPacker, UnsafeBitPacker}; #[cfg(target_arch = "x86_64")] use crate::Available; const BLOCK_LEN: usize = 32 * 8; #[cfg(target_arch = "x86_64")] mod avx2 { use super::BLOCK_LEN; use crate::Available; use std::arch::x86_64::__m256i as DataType; use std::arch::x86_64::_mm256_and_si256 as...
the_stack
pub fn parse_http_generic_error( response: &http::Response<bytes::Bytes>, ) -> Result<aws_smithy_types::Error, aws_smithy_xml::decode::XmlError> { crate::rest_xml_wrapped_errors::parse_generic_error(response.body().as_ref()) } #[allow(unused_mut)] pub fn deser_structure_crate_error_dependent_service_unavailabl...
the_stack
use image::{ open, DynamicImage, GenericImage, GenericImageView, GrayImage, Luma, Pixel, Rgb, RgbImage, }; use itertools::Itertools; use std::cmp::{max, min}; use std::collections::HashSet; use std::fmt; use std::fmt::Write; use std::path::Path; use std::u32; /// Helper for defining greyscale images. /// /// Colu...
the_stack
use std::time::Instant; // External imports use chrono::{Duration, Utc}; // Workspace imports use zksync_types::{ aggregated_operations::{AggregatedActionType, AggregatedOperation}, tx::TxHash, BlockNumber, SerialId, H256, }; // Local imports use self::records::{ NewExecutedPriorityOperation, NewExecute...
the_stack
use dipstick::*; use log::error; use std::convert::TryInto; use std::time::Instant; /// The environment variable used to specify how many metrics should be written to the metrics queue before flushing to statsd. const METRICS_INPUT_QUEUE_SIZE_VAR_NAME: &str = "KDI_METRICS_INPUT_QUEUE_SIZE"; /// The environment variabl...
the_stack
mod fs; use polyfuse::{ op, reply::{ AttrOut, EntryOut, FileAttr, OpenOut, ReaddirOut, Statfs, StatfsOut, WriteOut, XattrOut, }, KernelConfig, Operation, Session, }; use anyhow::{ensure, Context as _, Result}; use either::Either; use pico_args::Arguments; use slab::Slab; use std::{ collect...
the_stack
use crate::{ draw_target::DrawTarget, geometry::angle_consts::ANGLE_90DEG, geometry::{Angle, Dimensions}, pixelcolor::PixelColor, primitives::{ common::{ DistanceIterator, LineSide, LinearEquation, PlaneSector, PointType, NORMAL_VECTOR_SCALE, }, styled::{StyledDim...
the_stack
use std::borrow::Cow; use std::collections::HashMap; use std::fmt; // TODO: Remove duplication between text format AST and binary format AST. // For example, wat::ValType and wasm::TableType has the same structure. So we can use // wasm::TableType directly in parsing WAT. type Indices<'s> = HashMap<&'s str, u32>; //...
the_stack
use super::{FixedInterval, IntId, Intervals, Mention, MentionMap, Safepoints, VirtualInterval}; use crate::{ analysis_control_flow::{CFGInfo, InstIxToBlockIxMap}, analysis_data_flow::collect_move_info, analysis_data_flow::{ calc_def_and_use, calc_livein_and_liveout, get_sanitized_reg_uses_for_func, ...
the_stack
// Needed to pass shared state between functions // closures don't work because of recurssion #![allow(clippy::too_many_arguments)] #![allow(clippy::type_complexity)] use std::sync::RwLock; use hashbrown::HashSet; use ndarray::prelude::*; use numpy::{PyReadonlyArray1, PyReadonlyArray2}; use rayon::prelude::*; use p...
the_stack
use whitebox_raster::Raster; use crate::tools::*; use num_cpus; use std::env; use std::path; use std::f64; use std::sync::Arc; use std::sync::mpsc; use std::thread; use std::io::{Error, ErrorKind}; pub struct Geomorphons { name: String, description: String, toolbox: String, parameters: Vec<ToolParamete...
the_stack
use std::char; use std::cmp; use std::fmt::Debug; use std::slice; use std::u8; use unicode; // This module contains an *internal* implementation of interval sets. // // The primary invariant that interval sets guards is canonical ordering. That // is, every interval set contains an ordered sequence of intervals where...
the_stack
use std::collections::{HashMap, HashSet}; use std::sync::Arc; use serde::Deserialize; use serde_json::Value; use branch::Branch; use filter::Filter; use state::State; use crate::client::ClientContext; use crate::error::ClientResult; use crate::net::iterators::block::{ shard_ident_parse, shard_ident_...
the_stack
mod protocol; mod udmabuf; mod udmabuf_bindings; mod virtio_gpu; use std::cell::RefCell; use std::collections::{BTreeMap, VecDeque}; use std::convert::TryFrom; use std::i64; use std::io::Read; use std::mem::{self, size_of}; use std::num::NonZeroU8; use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; use std::...
the_stack
use parity_wasm::elements::{External, ImportEntry, Module}; use std::collections::BTreeSet; use std::collections::HashSet; use crate::errors::{VmError, VmResult}; use crate::features::required_features_from_module; use crate::limited::LimitedDisplay; use crate::static_analysis::{deserialize_wasm, ExportInfo}; /// Lis...
the_stack
use crate::controller::inner::ControllerInner; use crate::controller::migrate::Migration; use crate::controller::recipe::Recipe; use crate::coordination::CoordinationMessage; use crate::coordination::CoordinationPayload; use crate::startup::Event; use crate::Config; use async_bincode::AsyncBincodeReader; use dataflow::...
the_stack
pub mod chunk; mod chunk_origin; mod chunk_pair; mod chunk_shared_points; mod chunk_system; mod chunk_view; mod chunk_view_system; mod cursor; mod gen; // It's a private module; allow this. // (It's just used for grouping implementation code; // not in any public interface. Maybe one day I'll revisit // this and make t...
the_stack
use std::char; use std::cmp::max; use std::cmp::Ordering; use std::collections::HashSet; use std::fmt; use std::mem::swap; use std::ops::Range; /// A set of characters represented as a vector of ranges. #[derive(Clone, PartialEq, Eq, Hash)] pub struct CharacterSet { ranges: Vec<Range<u32>>, } /// A state in an NF...
the_stack
use { crate::index::{ fulfill_meta_far_blob, CompleteInstallError, FulfillMetaFarError, PackageIndex, }, anyhow::{anyhow, Error}, cobalt_sw_delivery_registry as metrics, fidl::endpoints::{RequestStream, ServerEnd}, fidl_fuchsia_io::{DirectoryMarker, FileRequest, FileRequestStream}, f...
the_stack
use std::collections::HashMap; use std::collections::hash_map::Entry; use std::fmt; use std::mem::swap; use std::error; use module::*; use module::Expr::*; use module::LiteralData::*; use lexer::Location; use graph::{Graph, VertexIndex, strongly_connected_components}; use builtins::builtins; use renamer::*; use interne...
the_stack
#[allow(missing_docs)] // documentation missing in model #[non_exhaustive] #[derive( std::clone::Clone, std::cmp::Eq, std::cmp::Ord, std::cmp::PartialEq, std::cmp::PartialOrd, std::fmt::Debug, std::hash::Hash, )] pub enum ParameterExceptionField { #[allow(missing_docs)] // documentation ...
the_stack
use std::fs; use std::io::{self, Read, Seek, Write}; use std::path::{Path, PathBuf}; use crate::errors::{Error, ErrorKind}; /// Wrapper around [`std::fs::File`][std::fs::File] which adds more helpful /// information to all errors. /// /// [std::fs::File]: https://doc.rust-lang.org/stable/std/fs/struct.File.html #[der...
the_stack
use image::{GenericImage, Luma}; use std::cmp; /// Computes the basic local binary pattern of a pixel, or None /// if it's too close to the image boundary. /// /// The neighbors of a pixel p are enumerated in the following order: /// /// <pre> /// 7 0 1 /// 6 p 2 /// 5 4 3 /// </pre> /// /// The nth most signifi...
the_stack
//! A command line interface (CLI) tool to format [JSON5](https://json5.org) ("JSON for //! Humans") documents to a consistent style, preserving comments. //! //! See [json5format](../json5format/index.html) for more details. //! //! # Usage //! //! formatjson5 [FLAGS] [OPTIONS] [files]... //! //! FLAGS: //! ...
the_stack
// Copyright (c) 2015 Rustcc Developers // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, pu...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_cas...
the_stack
use frame_support::{construct_runtime, ord_parameter_types, parameter_types, PalletId}; use frame_system::EnsureSignedBy; use sp_core::H256; use sp_runtime::{testing::Header, traits::IdentityLookup, DispatchError, Perbill}; use sp_std::collections::btree_map::BTreeMap; use sp_std::default::Default; use auction_manager...
the_stack
use super::RawHttpRequestVal; use crate::{crypto::SignedBytesWithoutDomainSeparator, CountBytes}; use ic_crypto_sha::Sha256; use ic_protobuf::proxy::ProxyDecodeError; use serde::{de::Deserializer, ser::Serializer, Deserialize, Serialize}; use std::{ collections::BTreeMap, convert::{AsRef, TryFrom}, error::E...
the_stack
#![no_std] #![feature(asm)] extern crate alloc; #[macro_use] extern crate log; extern crate spin; extern crate volatile; extern crate zerocopy; extern crate irq_safety; extern crate memory; extern crate pit_clock; extern crate stack; extern crate kernel_config; extern crate apic; extern crate acpi; extern crate madt; ...
the_stack
use super::types::AddressDto; use crate::netstack::types::CustomInterfaceInfo; use anyhow::{anyhow, Error}; use once_cell::sync::OnceCell; /// Network stack operations. #[derive(Debug, Default)] pub struct NetstackFacade { net_stack: OnceCell<fidl_fuchsia_net_stack::StackProxy>, interfaces_state: OnceCell<fidl...
the_stack
use { crate::{ error::{listing, throw, Error}, format::CodeStr, identifier::Identifier, schema, }, std::{ collections::{BTreeMap, HashMap, HashSet}, path::{Path, PathBuf}, }, }; // The index will be encoded as a 64-bit integer, but two of the bits are use...
the_stack
use backend::{MemoryBackend, StoreBackend}; use blob::{Blob, BlobReader, BlobError, BlobIndex, BlobStore, ChunkRef, NodeType, LeafType}; use crypto; use db; use hash; use quickcheck; use std::collections::HashSet; use std::sync::Arc; #[test] fn identity() { fn prop(chunks: Vec<Vec<u8>>) -> bool { let back...
the_stack
use crate::provider::Provider; use async_trait::async_trait; use reqwest::{Client, Error as ReqwestError}; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_json::Error as SerdeJsonError; use serde_with::serde_as; use starknet_core::{ serde::unsigned_field_element::UfeHex, types::{ A...
the_stack
use crate::errors::Error; use crate::json::{self, Deserialize, Deserializer, JsonObject, JsonValue, Serialize, Serializer}; use crate::serde; use crate::{Feature, FeatureCollection, Geometry}; use std::convert::TryFrom; use std::fmt; use std::iter::FromIterator; use std::str::FromStr; /// GeoJSON Objects /// /// ``` /...
the_stack
use iced_native::Color; //use iced_native::image; pub use iced_graphics::canvas::LineCap; use crate::style::{default_colors, text_marks, tick_marks}; use crate::KnobAngleRange; /// The appearance of a [`Knob`], /// /// [`Knob`]: ../../native/knob/struct.Knob.html #[derive(Debug, Clone)] pub enum Style { //Textur...
the_stack
use crate::crypto::rng::CryptoRng; use crate::error::Error; /// A type representing the X25519 DH scheme pub(crate) const X25519_IMPL: DhScheme = DhScheme(&X25519); pub(crate) const P256_IMPL: DhScheme = DhScheme(&DummyP256); const X25519_POINT_SIZE: usize = 32; const X25519_SCALAR_SIZE: usize = 32; /// An enum of ...
the_stack
//! The BIOS includes several System Call Functions which can be accessed by SWI //! instructions. //! //! * All BIOS functions clobber `r0`, `r1`, and `r3`. //! * Some functions also use `r2` as an input register. //! * All other registers are unaffected. // Note(Lokathor): This makes intra-doc links work. #[allow(un...
the_stack
#[macro_use] extern crate pest; use std::collections::HashMap; use pest::error::Error; use pest::iterators::{Pair, Pairs}; use pest::{state, ParseResult, Parser, ParserState, Span}; #[allow(dead_code, non_camel_case_types)] #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] enum Rule { json, ...
the_stack
use alloc::vec::Vec; use alloc::string::String; #[derive(Debug, Clone)] pub struct File { /// Filename pub name: String, /// Opened with `r` mode pub read: bool, /// Opened with `w` mode pub write: bool, /// Is currently open pub open: bool, /// Current file...
the_stack
use std::cmp::max; use std::env; use std::ffi::{OsStr, OsString}; use std::fmt::Write as FmtWrite; use std::fs::File; use std::io::Read; use std::io::Write as IoWrite; use std::process::Command; use ansi_term::Style; use chrono::offset::TimeZone; use clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, SubCommand}; use...
the_stack
pub use self::create_single_index_config::CreateSingleIndexConfig; use crate::face_tangents::face_tangent_at_idx; use crate::vertex_attributes::{BoneAttributes, SingleIndexedVertexAttributes, VertexAttribute}; use crate::{BlenderMesh, BoneInfluence, Vertex}; use std::collections::HashMap; use std::collections::HashSet;...
the_stack
use crate::parser::{ParsedSyntax, ParserProgress}; use crate::state::{EnterFunction, EnterParameters, SignatureFlags}; use crate::syntax::binding::{ is_at_identifier_binding, is_nth_at_identifier_binding, parse_binding, parse_binding_pattern, }; use crate::syntax::class::parse_initializer_clause; use crate::syntax:...
the_stack
mod util; mod errors; mod local; use std::fs::{File, OpenOptions}; use std::io::{Read, Write}; use std::sync::Mutex; use std::iter::Peekable; use std::slice::Iter; use std::collections::HashSet; use clap::ArgMatches; use super::lexer::Lexer; use super::parser; use super::parser::ast::*; use self::errors::CompilerErro...
the_stack
use std::collections::btree_map::Entry; use std::mem; use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Sub, SubAssign}; use crate::RoaringTreemap; impl RoaringTreemap { /// Computes the len of the union with the specified other treemap without creating a new /// treemap. /// ...
the_stack
use super::engine::{glsp, with_vm, Guard, Span}; use super::val::Val; use super::vm::Frame; use super::wrap::IntoVal; use std::error::Error; use std::fmt::{self, Debug, Display, Formatter}; //this isn't picked up properly by rustdoc, due to rustc bug 80557 (todo: remove this note once //the bug is fixed). moving the d...
the_stack
use crate::unescape::unescape; use std::borrow::Cow; use std::convert::TryFrom; use thiserror::Error; use xmlparser::{ElementEnd, Token, Tokenizer}; pub type Depth = usize; // in general, these errors are just for reporting what happened, there isn't // much value in lots of different match variants #[derive(Debug, ...
the_stack
use std::collections::HashMap; use std::net::SocketAddr; use hyper::HeaderMap; use hyper::{ header::HOST, http::request::Parts, Body, Response, StatusCode, }; use crate::dispatcher::RoutePattern; use crate::version::*; /// Create an HTTP 404 response pub(crate) fn not_found() -> Response<Body> { let ...
the_stack
use anyhow::bail; use std::collections::HashMap; use std::hash::Hash; use std::sync::atomic::{AtomicU32, Ordering::Acquire, Ordering::Relaxed, Ordering::Release}; use std::sync::{RwLock, TryLockError}; pub trait SBK: Eq + Hash + Copy + std::fmt::Debug {} impl<K: Eq + Hash + Copy + std::fmt::Debug> SBK for K {} pub t...
the_stack
use std::cmp; use std::fs::File; use std::io::Write; use std::os::unix::io::AsRawFd; use std::sync::{Arc, Mutex}; use address_space::AddressSpace; use machine_manager::{config::NetworkInterfaceConfig, event_loop::EventLoop}; use util::byte_code::ByteCode; use util::loop_context::EventNotifierHelper; use util::num_ops:...
the_stack
use bellperson::bls::Fr; use ff::Field; use filecoin_hashers::{blake2s::Blake2sHasher, sha256::Sha256Hasher, Domain, Hasher}; use fr32::fr_into_bytes; use merkletree::store::StoreConfig; use pretty_assertions::assert_eq; use rand::SeedableRng; use rand_xorshift::XorShiftRng; use storage_proofs_core::{ api_version::...
the_stack
use std::path::{Path, PathBuf}; use std::{env, fs}; use dada_execute::kernel::BufferKernel; use dada_ir::{filename::Filename, item::Item}; use eyre::Context; use lsp_types::Diagnostic; use regex::Regex; mod lsp_client; #[derive(structopt::StructOpt)] pub struct Options { #[structopt(parse(from_os_str), default_v...
the_stack
use super::api::frame::*; use super::def::*; use crate::api::*; use std::cell::RefCell; use std::cmp::Ordering; use std::rc::Rc; /* picture store structure */ #[derive(Default)] pub(crate) struct EvcPic { pub(crate) frame: Rc<RefCell<Frame<pel>>>, /* presentation temporal reference of this picture */ pub...
the_stack
use chrono::prelude::*; use time::Duration; // implements next/last direction in expressions like 'next friday' and 'last 4 july' #[derive(Debug,Clone,Copy,PartialEq)] pub enum Direction { Next, Last, Here } impl Direction { pub fn from_name(s: &str) -> Option<Direction> { use Direction::*; ...
the_stack
// this module is based on the content module in insta which in turn is based // on the content module in serde::private::ser. use std::any::{Any, TypeId}; use std::borrow::Cow; use std::cell::RefCell; use std::cmp::Ordering; use std::collections::BTreeMap; use std::convert::TryFrom; use std::fmt::{self, Write}; use s...
the_stack
use crate::{ bindings::ptrace::{PTRACE_EVENT_STOP, PTRACE_O_TRACESYSGOOD}, kernel_metadata::ptrace_event_name, session::task::record_task::RecordTask, sig::Sig, }; use fmt::Debug; use libc::{SIGSTOP, SIGTRAP, WEXITSTATUS, WIFEXITED, WIFSIGNALED, WIFSTOPPED, WSTOPSIG, WTERMSIG}; use std::{ convert::T...
the_stack
extern crate test; extern crate pairing; extern crate rand; extern crate bls; use rand::{Rand, SeedableRng, XorShiftRng}; use pairing::{CurveAffine, CurveProjective, Engine, Field, PrimeField}; use pairing::bls12_381::Bls12; use test::Bencher; type E = Bls12; #[test] fn blocksign() { let mut rng = XorShiftRng::fr...
the_stack
pub fn error_string(errcode: ::Status) -> &'static str { match errcode { ::Status::AlreadyLocked => "Tried to call lock a second time before unlock was called.", ::Status::BadCommand => "Tried to call a function on a data type that does not allow this \ type of funct...
the_stack
use super::{CommandContext, SpecCommand, SpecCommandError}; use serde::{Deserialize, Serialize}; use crate::events::EndpointEvent; use crate::projections::endpoint::ROOT_PATH_ID; use crate::projections::EndpointProjection; use crate::queries::EndpointQueries; use crate::state::endpoint::{ HttpMethod, PathComponentId...
the_stack
#![allow(dead_code)] use crate::{page::{zalloc, PAGE_SIZE}, kmem::{kmalloc, kfree}, virtio, virtio::{MmioOffsets, Queue, StatusField, VIRTIO_RING_SIZE, Descriptor, VIRTIO_DESC_F_WRITE, VIRTIO_DESC_F_NEXT}}; use core::{mem::size_of, ptr::null_mut}; // use alloc::boxed::Box; const F_VIRGL: u32...
the_stack
use crate::filesystem; use crate::id3tag::tag_for_track; use crate::ioutil::{Concat, LazyOpen, ReadSeek, Skip}; use crate::mp3; use crate::soundcloud; use chrono::Utc; use id3; use std::error; use std::fmt; use std::io::{self, Seek}; use std::path::PathBuf; const PADDING_START: u64 = 500; const PADDING_END: u64 = 20; ...
the_stack
use std::collections::HashMap; use std::hash::{Hash, Hasher}; use std::cell::{Cell, RefCell}; use std::rc::Rc; use std::fmt; use typed_arena::Arena; use ast::{Node, Loc, Id}; use define::MethodVisibility; use abstract_type::{TypeNodeRef, Prototype}; // can become NonZero<u64> once NonZero for non-pointer types hits st...
the_stack
use super::{SendEvent, SequenceNumber, UdpConnectionVars, UdpPacket, MAX_PACKET_SIZE}; use anyhow::Result; use log::*; use thiserror::Error; #[derive(Error, Debug)] pub(super) enum UdpRecvError { #[error( "received packet sequence number [{0}, {1}] is outside of the current window [{2}, {3}]" )] Ou...
the_stack
#[derive(Debug)] pub(crate) struct Handle< C = aws_smithy_client::erase::DynConnector, M = crate::middleware::DefaultMiddleware, R = aws_smithy_client::retry::Standard, > { pub(crate) client: aws_smithy_client::Client<C, M, R>, pub(crate) conf: crate::Config, } /// Client for AWS Cost and Usage Rep...
the_stack
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use crate::db::format::InternalKey; use crate::util::collection::HashSet; use crate::util::varint::{VarintU32, VarintU64}; use crate::version::version_...
the_stack
use std::{ borrow::Borrow, collections::{hash_map::RandomState, BTreeMap, HashMap}, ops::{Bound, RangeBounds}, time::Duration, }; use engine_traits::{CfName, CF_DEFAULT, CF_LOCK, CF_RAFT, CF_WRITE}; use futures::{channel::mpsc, executor::block_on, StreamExt}; use kvproto::raft_cmdpb::{CmdType, Request}...
the_stack
use std::mem; use std::net::Ipv4Addr; use std::ptr::null_mut; use std::sync::{Arc, Mutex}; use bytes::Bytes; use lazy_static::lazy_static; use libc::{c_void, sockaddr}; use winapi::shared::ntdef::HANDLE; use winapi::shared::ws2def::{AF_INET, SOCKADDR_IN}; use winapi::um::synchapi::SetEvent; use winapi::um::sysinfoapi:...
the_stack
use crate::bus::{PollResult, StringIndex, UsbBus, UsbBusAllocator}; use crate::class::{ControlIn, ControlOut, UsbClass}; use crate::control; use crate::control_pipe::ControlPipe; use crate::descriptor::{descriptor_type, lang_id, BosWriter, DescriptorWriter}; pub use crate::device_builder::{UsbDeviceBuilder, UsbVidPid};...
the_stack
use super::{CfiRules, StackInfoWin, WinStackThing}; use crate::FrameWalker; use log::{debug, trace}; use std::collections::HashMap; use std::str::FromStr; pub fn walk_with_stack_cfi( init: &CfiRules, additional: &[CfiRules], walker: &mut dyn FrameWalker, ) -> Option<()> { trace!("unwind: trying STACK C...
the_stack
use crate::DefaultMutator; use crate::Mutator; /* These mutators try to achieve multiple things: * avoid repetitions, such that if the value “7” was already produced, then it will not appear again * cover most of the search space as quickly as possible. For example, for 8-bit unsigned integers, it is...
the_stack
use raylib::prelude::*; // NOTE: Gamepad name ID depends on drivers and OS // #if defined(PLATFORM_RPI) // const XBOX360_NAME_ID "Microsoft X-Box 360 pad" const PS3_NAME_ID "PLAYSTATION(R)3 Controller" // #else // const XBOX360_NAME_ID "Xbox 360 Controller" const PS3_NAME_ID "PLAYSTATION(R)3 Controller" // #endif cons...
the_stack
//! Types used to send and receive primitives between a Thrift client and server. //! //! # Examples //! //! Create and use a `TInputProtocol`. //! //! ```no_run //! use thrift::protocol::{TBinaryInputProtocol, TInputProtocol}; //! use thrift::transport::TTcpChannel; //! //! // create the I/O channel //! let mut channe...
the_stack
pub(crate) use self::entry::Entry; use self::{ builtin::BUILTINS, data::{BUILTIN_TYPES, INSTANCE_PROPERTIES, STATIC_PROPERTIES}, }; use crate::{util::DataMapExt, version::should_enable, Versions}; use indexmap::IndexSet; use swc_atoms::{js_word, JsWord}; use swc_common::DUMMY_SP; use swc_ecma_ast::*; use swc_ec...
the_stack
use std::error::Error; use std::fmt; use async_trait::async_trait; use rusoto_core::credential::ProvideAwsCredentials; use rusoto_core::region; use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest}; use rusoto_core::{Client, RusotoError}; use rusoto_core::proto; use rusoto_core::signature::SignedReq...
the_stack
use crate::hasher::Hasher; use fnv::FnvHashMap; use models::primitives::GetBits; use std::fmt::Debug; // use std::time::Duration; // use rayon::prelude::*; fn select<T>(condition: bool, a: T, b: T) -> (T, T) { if condition { (a, b) } else { (b, a) } } // Nodes enumarated starting with ind...
the_stack
use crate::port; use core::marker::PhantomData; /// TWI Status Codes pub mod twi_status { // The status codes defined in the C header are meant to be used with the // masked status value: (TWSR & TW_STATUS_MASK). In our case, svd2rust // already added code to shift it to just the status value, so all stat...
the_stack
#[macro_use] #[doc(hidden)] pub mod internal; mod tests; #[macro_export] #[doc = include_str!("../doc/macros/BitArr_type.md")] macro_rules! BitArr { (for $len:expr, in $store:ty, $order:ty $(,)?) => { $crate::array::BitArray::< [$store; $crate::mem::elts::<$store>($len)], $order > }; (for $len:expr, in $st...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_cas...
the_stack
pub use rob::*; #[cfg(not(feature = "rob"))] mod rob { use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use crate::api::function::RouteFunction; use crate::channel_id::ChannelInfo; use crate::communication::buffer::BufferedPush; use crate::communication::cancel::{CancelHandle...
the_stack
//! Transformations of SQL ASTs. //! //! Most query optimizations are performed by the dataflow layer, but some //! are much easier to perform in SQL. Someday, we'll want our own SQL IR, //! but for now we just use the parser's AST directly. use uuid::Uuid; use ore::stack::{CheckedRecursion, RecursionGuard}; use sql_...
the_stack
use super::node::*; #[repr(u32)] #[derive(Debug, PartialEq)] pub enum NodeKind { Empty, Metadata, _FunctionLikeFirst, Program, FunctionExpression, ArrowFunctionExpression, FunctionDeclaration, _FunctionLikeLast, _StatementFirst, _LoopStatementFirst, WhileStatement, DoWhi...
the_stack
use std::convert::{AsRef, Infallible}; use std::io; use std::path::{Path, PathBuf}; use std::str::Utf8Error; use std::sync::Arc; use std::time::Duration; use chrono::Local; use headers::{ AcceptRanges, AccessControlAllowHeaders, AccessControlAllowOrigin, CacheControl, ContentLength, ContentType, ETag, HeaderMa...
the_stack
#![cfg_attr(not(test), allow(dead_code))] #![allow(clippy::cognitive_complexity)] #![allow(clippy::too_many_arguments)] #![allow(clippy::missing_safety_doc)] #[macro_use] extern crate lazy_static; #[macro_use] extern crate log; use chrono; use env_logger; use fnv; use libc; use time; use self::time::PreciseTime; u...
the_stack
use alloc::vec::Vec; use core::{cmp, mem, ptr, slice, str}; use syscall::{self, flag::*, Result}; use super::{ super::{errno, types::*, Pal, PalSocket}, e, Sys, }; use crate::header::{ arpa_inet::inet_aton, netinet_in::{in_addr, in_port_t, sockaddr_in}, string::strnlen, sys_socket::{constants::...
the_stack
use arrayvec::ArrayVec; use spin::Mutex; use crate::fdt::MachineMeta; use crate::memory_region::MemoryRegion; use crate::plic::PlicState; use crate::pmap::{PageTables, PageTableRoot}; use crate::riscv::bits::*; use crate::riscv::csr; use crate::statics::SHARED_STATICS; use crate::trap::U64Bits; use crate::{pmap, print,...
the_stack
use gazebo::prelude::*; use proc_macro2::TokenStream; use quote::{format_ident, quote_spanned}; use crate::{typ::*, util::*}; pub(crate) fn render(x: StarModule) -> TokenStream { let span = x.span(); let StarModule { name, globals_builder, visibility, docstring, stmts, ...
the_stack
use std::collections::HashMap; use std::collections::VecDeque; use aggregates::AggregateFun; use json_value::JsonValue; use key_builder::KeyBuilder; use query::OrderInfo; use snapshot::JsonFetcher; #[derive(Clone)] pub enum PathSegment { ObjectKey(String), Array(u64), ArrayAll, } #[derive(Clone)] pub str...
the_stack
// Portions from Chris Holcombe // The MIT License (MIT) // // Copyright (c) 2015 Chris Holcombe // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without l...
the_stack
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. /// This module con...
the_stack
use crate::LFOWaveform; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::ToValue; use std::boxed::Box as Box_; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GstLFOControlSource")] ...
the_stack