text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use crate::{ policy, test_util::{ support::{connect::Connect, http_util, profile, resolver}, *, }, Config, Inbound, }; use hyper::{client::conn::Builder as ClientBuilder, Body, Request, Response}; use linkerd_app_core::{ errors::respond::L5D_PROXY_ERROR, identity, io, proxy::...
the_stack
use { crate::{do_fetch, get_missing_blobs, verify_fetches_succeed, write_blob, TestEnv}, blobfs_ramdisk::BlobfsRamdisk, fidl_fuchsia_io::{DirectoryMarker, FileMarker}, fidl_fuchsia_pkg::{BlobInfo, BlobInfoIteratorMarker, NeededBlobsMarker}, fidl_fuchsia_pkg_ext::BlobId, fuchsia_merkle::MerkleTre...
the_stack
use crate::helpers::*; use crate::tester::TestResult::{Failure, ParseError, ReadError, Success}; use serde::de::DeserializeOwned; use simple_error::SimpleError; use std::{ fs::{self, DirEntry}, io::Write, panic::{self, RefUnwindSafe, UnwindSafe}, path::{Path, PathBuf}, sync::{Arc, Mutex}, }; use tem...
the_stack
use super::{ value_initializer::{InitResult, ValueInitializer}, CacheBuilder, ConcurrentCacheExt, }; use crate::{ sync::{ base_cache::{BaseCache, HouseKeeperArc, MAX_SYNC_REPEATS, WRITE_RETRY_INTERVAL_MICROS}, housekeeper::InnerSync, PredicateId, Weigher, WriteOp, }, Predicat...
the_stack
use shared::ntdef::ULONG; pub const HARDWARE_PROFILE_UNDOCKED_STRING: ULONG = 0x40010001; pub const HARDWARE_PROFILE_DOCKED_STRING: ULONG = 0x40010002; pub const HARDWARE_PROFILE_UNKNOWN_STRING: ULONG = 0x40010003; pub const WINDOWS_NT_BANNER: ULONG = 0x4000007E; pub const WINDOWS_NT_CSD_STRING: ULONG = 0x40000087; pub...
the_stack
use crate::{ShellCmdApi,CommonEnv}; use xous_ipc::String; use xous::{MessageEnvelope, Message}; use llio::I2cStatus; use codec::*; use spectrum_analyzer::{FrequencyLimit, FrequencySpectrum, samples_fft_to_spectrum}; use spectrum_analyzer::windows::hann_window; use rtc::{DateTime, Weekday}; use core::fmt::Write; use co...
the_stack
use std::slice::Iter; use std::str::FromStr; use super::lexer::Token; use super::bangs::Bang; use katatsuki::TrackFileType; use crate::error::{Error, Result}; use humantime::Duration; use chrono::NaiveDate; use super::time::*; trait BangIdentifier { fn as_bang_type(&self) -> BangType; } impl BangIdentifier for st...
the_stack
use std::{ collections::{HashMap, HashSet}, io::Cursor, }; use bitcoin::util::bip158::{BitStreamReader, BitStreamWriter}; use crypto::{hmac::Hmac, mac::Mac, pbkdf2::pbkdf2, sha2::Sha256}; use rand::{thread_rng, RngCore}; use account::Seed; use error::Error; const RADIX_BITS: usize = 10; // The length of the ...
the_stack
use crate::error::ContractError; use crate::helpers::{calculate_epoch_reward_rate, scale_reward_by_uptime, Delegations}; use crate::queries; use crate::storage::*; use config::defaults::DENOM; use cosmwasm_std::{ attr, coins, BankMsg, Coin, Decimal, DepsMut, Env, MessageInfo, Response, StdResult, Uint128, }; use co...
the_stack
use crate::prelude::*; use enso_logger::*; use crate::common::event::Event; use crate::common::ongoing_calls::OngoingCalls; use enso_logger::WarningLogger as Logger; use futures::channel::mpsc::UnboundedSender; use json_rpc::Transport; use json_rpc::TransportEvent; use std::future::Future; // =================== /...
the_stack
use std::iter::Iterator; pub use token::*; #[cfg(test)] mod test; pub struct Lexer<'src> { /// Byte offset from the start of the source string. offset: usize, /// The source string. src: &'src str, /// The last character to be read. current_char: Option<char>, /// The kind of token we read...
the_stack
use crate::cellfilter::permit_list_from_file; use crossbeam_queue::ArrayQueue; use indicatif::{ProgressBar, ProgressStyle}; #[allow(unused_imports)] use slog::{crit, info, warn}; use needletail::bitkmer::*; use sprs::TriMatI; use std::collections::HashSet; use std::fs; use std::io::{BufRead, BufReader, BufWriter, Writ...
the_stack
use std::{ mem, panic::{catch_unwind, UnwindSafe}, }; use bytes::{Buf, BufMut, Bytes, BytesMut}; use futures_util::io::{AsyncRead, AsyncReadExt}; pub use begin::Begin; pub use discard::Discard; pub use failure::Failure; pub use hello::Hello; pub use init::Init; pub use pull::Pull; pub use record::Record; pub ...
the_stack
use super::apdu::{ApduStatusCode, APDU}; use super::hid::ChannelID; use super::status_code::Ctap2StatusCode; use super::CtapState; use alloc::vec::Vec; use arrayref::array_ref; use core::convert::Into; use core::convert::TryFrom; use crypto::rng256::Rng256; use libtock_drivers::timer::ClockValue; // For now, they're t...
the_stack
// // Copyright (c) 2018 Stegos AG // // 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, publish, ...
the_stack
use crate::aes; use crate::ffi; use crate::password::PasswordError; use crate::rutil::safe_string::SafeString; use crate::rutil::safe_vec::SafeVec; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use rand::{rngs::OsRng, RngCore}; use serde::{Deserialize, Serialize}; use serde_json; use serde_json::Error; use s...
the_stack
extern crate modbus; extern crate test_server; mod connection_tests { use modbus::tcp::{Config, Transport}; use std::time::{Duration, Instant}; #[test] fn test_connect_timeout() { let mut cfg = Config::default(); cfg.tcp_connect_timeout = Some(Duration::from_millis(1050)); let ...
the_stack
pub struct ListAggregatedUtterancesPaginator< C = aws_smithy_client::erase::DynConnector, M = crate::middleware::DefaultMiddleware, R = aws_smithy_client::retry::Standard, > { handle: std::sync::Arc<crate::client::Handle<C, M, R>>, builder: crate::input::list_aggregated_utterances_input::Builder, } ...
the_stack
use super::selection; use super::updater; use crate::contacts::GrinboxAddress; use crate::wallet::types::{ Context, InitTxArgs, NodeClient, Slate, TxLogEntryType, TxProof, WalletBackend, }; use crate::wallet::ErrorKind; use failure::Error; use grin_keychain::{Identifier, Keychain}; use grin_util::secp::key::PublicKey;...
the_stack
use futures::future::{err, ok, Future}; use std::rc::Rc; use super::{box_up_err, peer_strerr, BoxedNewPeerFuture, Peer}; use super::{ConstructParams, L2rUser, PeerConstructor, Specifier}; use tokio_io::io::{read_exact, write_all}; use std::io::Write; use std::net::{IpAddr, Ipv4Addr}; use std::ffi::OsString; #[deri...
the_stack
use super::*; decl!(i32x8: i32 => __m256i); impl<S: Simd> Default for i32x8<S> { #[inline(always)] fn default() -> Self { Self::new(unsafe { _mm256_setzero_si256() }) } } #[rustfmt::skip] macro_rules! log_reduce_epi32_avx2 { ($value:expr; $op:ident) => {unsafe { let ymm0 = $value; ...
the_stack
use crate::{ cmd::{ forge::script::receipts::wait_for_receipts, has_different_gas_calc, ScriptSequence, VerifyBundle, }, init_progress, opts::WalletType, update_progress, utils::get_http_provider, }; use ethers::{ prelude::{Http, Provider, RetryClient, Signer, SignerMiddlewar...
the_stack
use std::{cell::RefCell, fmt}; use wayland_client::{ protocol::{wl_output, wl_registry, wl_seat, wl_shell, wl_surface}, Attached, DispatchData, }; pub use wayland_protocols::xdg_shell::client::xdg_toplevel::State; use wayland_protocols::{ unstable::xdg_shell::v6::client::zxdg_shell_v6, xdg_shell::clie...
the_stack
use std::collections::{HashMap, HashSet}; use std::cmp; use std::io; use disk::tasks::helpers::piece_accessor::PieceAccessor; use disk::fs::{FileSystem}; use memory::block::BlockMetadata; use error::{TorrentResult, TorrentError, TorrentErrorKind}; use disk::tasks::helpers; use bip_metainfo::{Info}; use bip_util::bt::...
the_stack
use std::collections::HashMap; use std::rc::Rc; #[derive(Debug, Clone)] pub struct InheritedConfig { // Whether cross-checks are enabled overall pub enabled: bool, // Function-specific overrides pub entry: super::XCheckType, pub exit: super::XCheckType, pub all_args: super::XCheckType, pub...
the_stack
use rayon::ThreadPool; use rayon::ThreadPoolBuilder; use std::convert::TryFrom; use std::io; use std::io::Write; use std::ptr; use std::ffi::CStr; use std::os::raw::c_char; use libc::{c_void, c_int, size_t}; use super::ColorType; use super::Strategy; use super::CompressionLevel; use super::Mode::{Adaptive, Fixed}...
the_stack
use imgui::*; use na::Vector3; use std::collections::HashSet; use crate::gpu_obj::heightmap_gpu; use noise::{NoiseFn, Seedable}; #[derive(PartialEq, Clone, Copy)] pub enum Mode { Raise, Flatten, Median, Noise, Blur, } pub struct State { pub map_path: String, pub pen_radius: u32, pub p...
the_stack
use cargo::core::{enable_nightly_features, GitReference, SourceId, Workspace}; use cargo::util::Sha256; use cargo::util::{CargoResult, CargoResultExt, Config}; use docopt::Docopt; use failure::bail; use serde::{Deserialize, Serialize}; use std::collections::hash_map::DefaultHasher; use std::collections::{BTreeMap, BTre...
the_stack
use super::{basic_block::BasicBlockId, module::Module, types::*, value::*}; use id_arena::{Arena, Id}; use std::cell::RefCell; pub type InstructionId = Id<Instruction>; #[derive(Clone, Debug)] pub struct Instruction { pub opcode: Opcode, // pub operands: Vec<Operand>, pub operand: InstOperand, pub ty:...
the_stack
use crate::v2::multi_version_graph::MultiVersionGraph; use crate::v2::api::{SnapshotId, VertexId, LabelId, PropertyId, EdgeId, Records, SerialId, EdgeInnerId}; use crate::v2::api::types::{EdgeRelation, Vertex, PropertyReader, PropertyValue, Property, Edge}; use crate::v2::api::condition::Condition; use crate::v2::Resul...
the_stack
use crate::{ backoff::{Backoff, BackoffConfig}, client::error::{Error, Result}, connection::{BrokerCache, BrokerConnection, BrokerConnector, MessengerTransport}, messenger::RequestError, protocol::{ error::Error as ProtocolError, messages::{ DeleteRecordsRequest, DeleteRe...
the_stack
use crate::internal::encodings::varint::*; use crate::prelude::*; use std::collections::HashMap; use std::convert::{TryFrom, TryInto}; use std::fmt; use std::ops::Deref; /// This wrapper is just to make the Debug impl not display every byte pub struct Bytes<'a>(&'a [u8]); impl fmt::Debug for Bytes<'_> { fn fmt(&s...
the_stack
use level::Level; use light::{self, Contrast, LightInfo}; use math::{Line2f, Vec2f, Vec3f, Vector}; use meta::WadMetadata; use num::Zero; use std::cmp; use std::cmp::Ordering; use tex::TextureDirectory; use types::{ChildId, ThingType, WadCoord, WadName, WadNode, WadSector, WadSeg, WadThing}; use util::{from_wad_coords,...
the_stack
use shared::*; use spirv_std::glam::{const_vec3, vec2, vec3, Mat3, Vec2, Vec3, Vec3Swizzles, Vec4, Vec4Swizzles}; // Note: This cfg is incorrect on its surface, it really should be "are we compiling with std", but // we tie #[no_std] above to the same condition, so it's fine. #[cfg(target_arch = "spirv")] use spirv_st...
the_stack
use std::sync::Arc; use api_version::{dispatch_api_version, match_template_api_version, KeyMode, KvFormat, RawValue}; use encryption::DataKeyManager; use engine_traits::{raw_ttl::ttl_to_expire_ts, KvEngine, SstWriter}; use kvproto::{import_sstpb::*, kvrpcpb::ApiVersion}; use tikv_util::time::Instant; use txn_types::{i...
the_stack
use ::std::io::Read; use ::std::io::Write; use ::kernel::arch::imp::threads::test_pause_thread; extern crate core; #[macro_use] extern crate kernel; extern crate syscalls; mod fs_shim; mod video_shim; struct ThreadSyscallInfo { process_handle: ::process_memory::ProcessHandle, buffers: Vec<SyscallBuffer>, } struct ...
the_stack
use std::f64::consts::TAU; pub trait Interpolate { fn interpolate(left: Self, right: Self, interpolation: f64) -> Self; } impl Interpolate for f64 { fn interpolate(left: Self, right: Self, interpolation: f64) -> Self { (1.0 - interpolation) * left + interpolation * right } } impl Interpolate for ...
the_stack
use crate::{ pointer_trait::{ AsPtr, AsMutPtr, CallReferentDrop,Deallocate,CanTransmuteElement, GetPointerKind,PK_SmartPointer,OwnedPointer, }, sabi_types::MovePtr, std_types::RBox, }; use std::{ alloc::{self,Layout}, fmt::{self,Display}, marker::PhantomData, mem::{self,...
the_stack
use crate::common::csc_strategy; use nalgebra::proptest::matrix; use nalgebra::DMatrix; use nalgebra_sparse::convert::serial::{ convert_coo_csc, convert_coo_csr, convert_coo_dense, convert_csc_coo, convert_csc_csr, convert_csc_dense, convert_csr_coo, convert_csr_csc, convert_csr_dense, convert_dense_coo, co...
the_stack
use std::fmt::{Debug, Error, Formatter}; use std::ops::{Deref, DerefMut}; use image::{DynamicImage, GenericImageView, RgbaImage}; use libwebp_sys::WebPEncodingError::VP8_ENC_OK; use libwebp_sys::WebPPreset::WEBP_PRESET_DEFAULT; use libwebp_sys::*; use once_cell::sync::OnceCell; static CONFIG: OnceCell<WebPConfig> = O...
the_stack
use std::ops::Deref; use std::sync::atomic::Ordering; use num::FromPrimitive; use atomic_enum::AtomicEnum; use audio_garbage_collector::{make_shared, Handle, Shared}; use audio_processor_standalone::standalone_vst::vst::util::AtomicFloat; use audio_processor_traits::audio_buffer::OwnedAudioBuffer; use audio_processor...
the_stack
use core::marker::PhantomData; use managed::ManagedSlice; use crate::arch::Arch; use crate::common::{Signal, Tid}; use crate::connection::{Connection, ConnectionExt}; use crate::protocol::commands::Command; use crate::protocol::{Packet, ResponseWriter, SpecificIdKind}; use crate::target::ext::base::multithread::Threa...
the_stack
use super::arenas::TypeArena; use super::*; use rustc_hash::FxHashSet; use std::cell::Cell; use std::collections::VecDeque; /// A type variable /// /// Each type variable has a unique identifier by which it is referred to. /// Type vars also have a rank, indicating the lexical scope at which they /// are introduced, w...
the_stack
use crate::daemonizer::wow64_disable_exc; use crate::executor::proc::{BaseCommand, MyCommand}; use crate::start_failed_err_info; use async_trait::async_trait; use core::mem; use log::{debug, error, info, warn}; use ntapi::ntpsapi::{ NtResumeProcess, NtSetInformationProcess, ProcessAccessToken, PROCESS_ACCESS_TOKEN,...
the_stack
use parking_lot::Mutex; use std::sync::Arc; use crate::error::GGRSError; use crate::frame_info::{GameInput, GameState}; use crate::input_queue::InputQueue; use crate::network::udp_msg::ConnectionStatus; use crate::{Frame, GGRSRequest, PlayerHandle, NULL_FRAME}; /// An `Arc<Mutex<GameState>>` that you can `save()`/`lo...
the_stack
use crate::codegen::{ block, build_context_function, util, values, BuilderContext, LifecycleFunc, ObjectCache, }; use crate::mir::{Node, NodeData, Surface, SurfaceRef}; use inkwell::attribute::AttrKind; use inkwell::builder::Builder; use inkwell::module::{Linkage, Module}; use inkwell::values::{FunctionValue, Point...
the_stack
use std::str::Chars; use std::str::FromStr; use byteorder::LittleEndian; use byteorder::WriteBytesExt; use uuid::Uuid; use crate::atn::ATN; use crate::atn_deserialization_options::ATNDeserializationOptions; use crate::atn_state::ATNBlockStart; use crate::atn_state::ATNDecisionState; use crate::atn_state::ATNState; us...
the_stack
use std::error::Error; use std::fmt; use std::fmt::Display; pub const BLOCK_SIZE: usize = 16; const NB: usize = 4; // Note: block[column][row] type Block = [[u8; 4]; 4]; const SBOX: [u8; 256] = [ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9,...
the_stack
use super::{matchers, Matcher, Type}; #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum MatcherType { App, Archive, Audio, Book, Doc, Font, Image, Text, Video, Custom, } // This is needed until function pointers can be used in `const fn`. // See trick and discussion at http...
the_stack
use failure::{Error, ResultExt}; use std::env; use std::path::PathBuf; use std::process::Command; use crate::env::{corpora_dir, root_dir, state_dir}; use crate::fuzzers::{FuzzerConfig, FuzzerQuit}; use crate::targets::Targets; static LANGUAGE: &str = "nim"; /*********************************************** name: libf...
the_stack
extern crate regex; extern crate structopt; #[macro_use] extern crate clap; #[macro_use] extern crate failure; // Strum contains all the trait definitions extern crate strum; #[macro_use] extern crate strum_macros; use crate::strum::IntoEnumIterator; use failure::Error; use std::env as real_env; use structopt::Struct...
the_stack
use crate::operators::DataflowFrontier; use crate::operators::Recovery; use crate::recovery::build_state_caches; use crate::recovery::RecoveryConfig; use send_wrapper::SendWrapper; use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; use std::thread; use std::time::Duration; use pyo...
the_stack
use crate::msgs::enums::{ContentType, HandshakeType, ExtensionType, SignatureScheme}; use crate::msgs::enums::{ProtocolVersion, AlertDescription, NamedGroup}; use crate::msgs::message::{Message, MessagePayload}; use crate::msgs::base::{Payload, PayloadU8}; use crate::msgs::handshake::{HandshakePayload, HandshakeMessage...
the_stack
use std::collections::{HashMap, HashSet}; use std::default::Default; use std::iter::FromIterator; use std::sync::mpsc::channel; use std::time::Duration; use timely::dataflow::channels::pact::Pipeline; use timely::dataflow::operators::Operator; use declarative_dataflow::server::Server; use declarative_dataflow::timest...
the_stack
use crate::cx::*; use makepad_microserde::*; use std::any::TypeId; use std::collections::{HashMap,BTreeSet}; #[derive(Clone, Debug, PartialEq, Default)] pub struct KeyModifiers { pub shift: bool, pub control: bool, pub alt: bool, pub logo: bool } #[derive(Clone, Debug, PartialEq)] pub enum FingerInput...
the_stack
use super::dir::{Dir, DirEntry}; use crate::async_fuse::fuse::protocol::{FuseAttr, INum}; use std::collections::BTreeMap; use std::os::unix::io::RawFd; use std::path::Path; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use anyhow::Context; use log::debug; use nix::fcntl::{self, OFlag}; use nix::sys::stat::{self,...
the_stack
// Substrate is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // Substrate is distributed in the hope that it will be useful, // but...
the_stack
use bytes::Bytes; use futures::{ self, executor::block_on, stream, Sink, SinkExt, TryStream, TryStreamExt, }; use std::{cmp::min, error, fmt, panic, pin::Pin, result}; use tokio::{io, process::Child, sync::mpsc, task}; use tokio_stream::wrappers::ReceiverStream; use crate::common::*; /// Standard future type for ...
the_stack
pub mod config; pub mod dag; pub mod error; #[macro_use] pub mod ipld; pub mod ipns; pub mod p2p; pub mod path; pub mod refs; pub mod repo; mod subscription; pub mod unixfs; #[macro_use] extern crate tracing; use anyhow::{anyhow, format_err}; use cid::Codec; use either::Either; use futures::{ channel::{ m...
the_stack
use { crate::repository_manager::RepositoryManager, anyhow::{anyhow, format_err, Error}, cobalt_sw_delivery_registry as metrics, fidl_fuchsia_pkg_rewrite_ext::Rule, fuchsia_cobalt::CobaltSender, fuchsia_component::client::connect_to_protocol, fuchsia_inspect::{self as inspect, Property as _,...
the_stack
//! Renders a plan into a timely/differential dataflow computation. //! //! ## Error handling //! //! Timely and differential have no idioms for computations that can error. The //! philosophy is, reasonably, to define the semantics of the computation such //! that errors are unnecessary: e.g., by using wrap-around sem...
the_stack
//! Representation and management of devices connected to the server. use super::{ButtplugClientError, ButtplugClientRequest, ButtplugClientResultFuture}; use crate::{ client::{ButtplugClientMessageFuturePair, ButtplugServerMessageFuture}, connector::ButtplugConnectorError, core::{ errors::{ButtplugDeviceErr...
the_stack
use crate::{error::Error, session::Session}; use std::{ io::{self, Write}, ops::{Deref, DerefMut}, process::Command, }; /// A logging wrapper of session pub struct SessionWithLog { inner: Session, logger: Option<Box<dyn Write + Send>>, } impl SessionWithLog { /// Spawn session wrapped with log...
the_stack
use futures::task::{Context, Poll}; use futures::{ future::{FusedFuture, Future}, stream::{FusedStream, Stream}, }; use futures_intrusive::channel::{ ChannelSendError, LocalChannel, LocalUnbufferedChannel, }; use futures_test::task::{new_count_waker, panic_waker}; use pin_utils::pin_mut; #[derive(Debug)] s...
the_stack
use std::collections::HashMap; use std::rc::Rc; use rustc_serialize::{Decodable, Decoder}; use animation::AnimationClip; use transform::{Transform, FromTransform}; use blend_tree::{AnimBlendTree, BlendTreeNodeDef, ClipId}; use skeleton::Skeleton; const MAX_JOINTS: usize = 64; /// A state that an AnimationController...
the_stack
use codespan_reporting::diagnostic::{Diagnostic, Severity}; use codespan_reporting::files::SimpleFiles; use codespan_reporting::term::termcolor::{BufferedStandardStream, ColorChoice, WriteColor}; use std::cell::RefCell; use std::io::Read; use std::path::Path; use crate::core::binary; use crate::core::binary::ReadError...
the_stack
use std::path::Path; use std::fs; use std::fs::File; use std::io::{Read, Write}; use compiler; use parser; use parser::Node; use parser::Node::{Value, Static, Unescaped, Section, Part}; use Data; use Data::{Bool, Integer, Float, Vector, Hash, Lambda}; use build::HashBuilder; use std::collections::HashMap; use errors:...
the_stack
pub mod digest; use digest::*; use std::collections::{HashMap, HashSet}; use uuid::{Uuid, Version}; mod patterns; use patterns::*; pub mod path; use path::*; pub fn check_values_req(values: &HashSet<String>) -> ValueDescriptor { search_for_patterns(values.iter().collect()) } pub fn check_values_res(values: &HashMa...
the_stack
use clap::value_t_or_exit; use failure::ResultExt; use futures_util::future::{Either, FutureExt, TryFutureExt}; use futures_util::stream::futures_unordered::FuturesUnordered; use noria_applications::Timeline; use rand::prelude::*; use rand_distr::Exp; use std::cell::RefCell; use std::collections::VecDeque; use std::fs;...
the_stack
extern crate serde_derive; #[macro_use] extern crate failure; #[macro_use] extern crate lazy_static; extern crate clap; extern crate glob; extern crate human_size; extern crate permutate; extern crate prettytable; extern crate serde; extern crate serde_json; extern crate toml; use std::collections::HashMap; use std::e...
the_stack
use crate::{ account_config::XUS_NAME, account_state_blob::AccountStateBlob, block_info::BlockInfo, chain_id::ChainId, ledger_info::LedgerInfo, proof::{ definition::MAX_ACCUMULATOR_PROOF_DEPTH, AccountStateProof, AccumulatorExtensionProof, EventAccumulatorInternalNode, EventAccum...
the_stack
use std::error::Error; use std::fmt::{self, Display}; use std::io; use std::mem::MaybeUninit; use std::os::raw::c_void; use std::ptr; #[cfg(all(unix, target_arch = "x86_64"))] #[path = "unix.rs"] pub mod sys; #[cfg(all(unix, target_arch = "aarch64"))] #[path = "unix.rs"] pub mod sys; #[cfg(all(windows, target_arch =...
the_stack
mod expression; mod function; mod statement; pub use expression::*; pub use function::*; use noirc_abi::{AbiFEType, AbiType}; pub use statement::*; #[derive(Debug, PartialEq, Eq, Clone)] pub enum ArraySize { Variable, Fixed(u128), } impl ArraySize { fn is_fixed(&self) -> bool { matches!(self, Arr...
the_stack
use num::Zero; use simba::scalar::{RealField, SubsetOf, SupersetOf}; use simba::simd::{PrimitiveSimdValue, SimdValue}; use crate::base::allocator::Allocator; use crate::base::dimension::{DimMin, DimNameAdd, DimNameSum, U1}; use crate::base::{Const, DefaultAllocator, Matrix2, Matrix3, Matrix4, OMatrix, SMatrix, Scalar...
the_stack
use crate::{ backend::{ egl::{ context::GlAttributes, display::EGLDisplay, native, EGLContext, EGLSurface, Error as EGLError, }, input::{ Axis, AxisSource, ButtonState, Device, DeviceCapability, Event as BackendEvent, InputBackend, InputEvent, KeyState, Ke...
the_stack
use ttf_parser::GlyphId; use ttf_parser::opentype_layout::LookupIndex; use ttf_parser::opentype_layout::positioning::*; use ttf_parser::parser::TryNumFrom; use crate::{Direction, Face}; use crate::buffer::{Buffer, BufferScratchFlags, GlyphPosition}; use crate::plan::ShapePlan; use super::{lookup_flags, LayoutLookup, ...
the_stack
use std::{ env, ffi::{OsStr, OsString}, fmt::Display, path::{Path, PathBuf}, process::{Command, Stdio}, }; use curl::easy::Easy; use tar::Archive; use xz::read::XzDecoder; static PREBUILT_LLVM_URL: &str = "https://github.com/rust-gpu/rustc_codegen_nvvm-llvm/releases/download/LLVM-7.1.0/"; sta...
the_stack
use bytecodec::{DecodeExt, EncodeExt}; use fibers::sync::mpsc; use fibers::sync::oneshot::Monitored; use fibers::time::timer; use fibers_rpc::client::ClientServiceHandle as RpcServiceHandle; use fibers_tasque::{self, AsyncCall, TaskQueueExt}; use frugalos_raft::{NodeId, RaftIo}; use futures::{Async, Future, Poll, Strea...
the_stack
use crate::prelude::*; use crate::utils::get_supertype; use std::fmt::{Debug, Formatter}; #[derive(Debug, Clone, PartialEq, Default)] pub struct Row<'a>(pub Vec<AnyValue<'a>>); impl<'a> Row<'a> { pub fn new(values: Vec<AnyValue<'a>>) -> Self { Row(values) } } impl DataFrame { /// Get a row from a...
the_stack
use crate::ast::*; use super::error::*; use super::expr; use super::primitives::*; use super::reader::Reader; use super::ParseResult; pub fn url(reader: &mut Reader) -> ParseResult<'static, Template> { // can not be json-encoded // can not be empty // but more restrictive: whitelist characters, not empty ...
the_stack
#![allow(dead_code)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(nonstandard_style)] #![allow(unused_imports)] #![allow(unused_mut)] use super::referencetoatnlistener::*; use antlr_rust::atn::{ATN, INVALID_ALT}; use antlr_rust::atn_deserializer::ATNDeserializer; use antlr_rust::dfa::DFA; use an...
the_stack
use protobuf::Message; use protobuf_test_common::*; use super::test_fmt_text_format_pb::*; use protobuf::text_format::print_to_string; #[test] fn test_show() { let mut m = TestTypes::new(); m.set_bool_singular(true); assert_eq!("bool_singular: true", &*format!("{:?}", m)); } #[test] fn test_pretty() { ...
the_stack
use io::IORegisters; #[cfg(feature = "heap_alloc")] #[cfg(feature = "enable_sound")] use alloc::vec::Vec; // TODO: Vary this on different platforms? const SOUND_CPU_SPEED: u32 = 4194304; const SOUND_LENGTH_CLOCK_STEP: u32 = (SOUND_CPU_SPEED as f32 / 256f32) as u32; pub const OUTPUT_FREQUENCY: u32 = 48000; #[cfg(fe...
the_stack
use crate::time::Timestamp; use core::time::Duration; /// An implementation of the Hybrid Slow Start algorithm described in /// "Hybrid Slow Start for High-Bandwidth and Long-Distance Networks" /// https://pdfs.semanticscholar.org/25e9/ef3f03315782c7f1cbcd31b587857adae7d1.pdf /// Most of the constants have been update...
the_stack
use magnitude::Magnitude; use num_traits::{Unsigned, Zero}; use std::collections::HashMap; use std::{any::Any, collections::HashSet}; use crate::provide::{Edges, Graph, Vertices}; use crate::{ graph::{subgraph::ShortestPathSubgraph, Edge, EdgeDir}, prelude::Neighbors, }; /// Finds shortest path from a single ...
the_stack
use super::{ background::Background, mesh_renderer::MeshRenderer, particle_renderer::ParticleRenderer, screenspace_fluid::ScreenSpaceFluid, static_line_renderer::{LineVertex, StaticLineRenderer}, volume_renderer::{VolumeRenderer, VolumeVisualizationMode}, voxel_renderer::VoxelRenderer, }; us...
the_stack
use bytes::BytesMut; use futures::{ channel::mpsc::{Receiver, UnboundedSender}, stream::FusedStream, task::Waker, Stream, }; use std::{ io, pin::Pin, task::{Context, Poll}, }; use log::{debug, trace}; use tokio::io::{AsyncRead, AsyncWrite, ReadBuf}; use crate::{ config::INITIAL_STREAM...
the_stack
use std::fs; use crc::crc32::{self, Digest, Hasher32}; use rocksdb::*; use super::tempdir_with_prefix; fn gen_sst(opt: ColumnFamilyOptions, cf: Option<&CFHandle>, path: &str) { let _ = fs::remove_file(path); let env_opt = EnvOptions::new(); let mut writer = if cf.is_some() { SstFileWriter::new_cf...
the_stack
extern crate byteorder; use crate::component::table::Row; use crate::storage::bytescoder::BytesCoder; use crate::storage::diskinterface::{DiskError, DiskInterface, TableMeta}; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use std::fs; use std::io::{BufReader, Read, Write}; use std::path::Path; pub struct I...
the_stack
use cachepot::config::{HTTPUrl, WorkerUrl}; use cachepot::coordinator::CoordinatorInfo; use cachepot::dist::{self, SchedulerStatusResult}; use cachepot::util::fs; use std::env; use std::io::Write; use std::net::{IpAddr, SocketAddr}; use std::path::{Path, PathBuf}; use std::process::{Command, Output, Stdio}; use std::st...
the_stack
// Locals use crate::filetransfer::{ params::{AwsS3Params, GenericProtocolParams, ProtocolParams}, FileTransferParams, FileTransferProtocol, }; #[cfg(not(test))] // NOTE: don't use configuration during tests use crate::system::config_client::ConfigClient; #[cfg(not(test))] // NOTE: don't use configuration durin...
the_stack
use binaryninja::{ binaryview::{BinaryView, BinaryViewExt}, command::{register, Command}, databuffer::DataBuffer, disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenType}, flowgraph::{BranchType, EdgeStyle, FlowGraph, FlowGraphNode, FlowGraphOption}, }; use gimli::{ At...
the_stack
use fixtures::{ json::{self, JsonFixture}, package_id, }; use guppy::graph::{ feature::{feature_filter, FeatureId}, BuildTargetId, BuildTargetKind, DependencyDirection, DotWrite, PackageDotVisitor, PackageLink, PackageMetadata, }; use std::{fmt, iter}; mod small { use super::*; use crate::f...
the_stack
use std::cmp::{max, min}; use std::fmt::{self, Display}; use std::fs::{File, OpenOptions}; use std::io::{self, ErrorKind, Read, Seek, SeekFrom}; use std::ops::Range; use crate::{create_disk_file, DiskFile, DiskGetLen, ImageType}; use base::{ AsRawDescriptors, FileAllocate, FileReadWriteAtVolatile, FileSetLen, File...
the_stack
use std::marker::PhantomData; use crate::crypto::feistel::{self, FeistelPrecomputed}; use crate::drgraph::{BucketGraph, Graph}; use crate::hasher::Hasher; use crate::layered_drgporep::Layerable; use crate::parameter_cache::ParameterSetIdentifier; pub const DEFAULT_EXPANSION_DEGREE: usize = 8; #[derive(Debug, Clone, ...
the_stack
use glib::clone; use glib::ObjectExt; use gtk4::{glib, prelude::*, subclass::prelude::*}; use log::{debug, info, warn}; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; use std::io::Read; use std::thread; #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")...
the_stack
use crate::common::{fixtures::*, lua, poll, session}; use assert_fs::prelude::*; use mlua::chunk; use once_cell::sync::Lazy; use rstest::*; static TEMP_SCRIPT_DIR: Lazy<assert_fs::TempDir> = Lazy::new(|| assert_fs::TempDir::new().unwrap()); static SCRIPT_RUNNER: Lazy<String> = Lazy::new(|| String::from("bash")); stat...
the_stack
use std::borrow::{Borrow, Cow}; use std::fmt::{Debug, Formatter}; use std::fs::File; use std::io::Write; use std::path::Path; use csv::{StringRecord, Trim}; use indexmap::map::IndexMap; use indexmap::Equivalent; use memmap2::Mmap; use crate::analysis::Mode; use crate::dic::build::error::{BuildFailure, DicCompilationC...
the_stack
#[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct ResiliencyPolicy { /// <p>The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:<code>partition</code>:dcps:<code>region</code>:<code>account</code>:resiliency-policy/<code>policy-id</code>. For more in...
the_stack
use proptest::{ arbitrary::{any, Arbitrary}, prelude::*, }; use std::{collections::HashMap, sync::Arc}; use crate::{ amount::NonNegative, block, fmt::SummaryDebug, history_tree::HistoryTree, parameters::{ Network, NetworkUpgrade::{self, *}, GENESIS_PREVIOUS_BLOCK_HA...
the_stack