text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use crate::control_flow_graph::VMControlFlowGraph; use move_binary_format::{ access::{ModuleAccess, ScriptAccess}, errors::{PartialVMError, PartialVMResult}, file_format::{ AbilitySet, AddressIdentifierIndex, CodeUnit, CompiledScript, Constant, ConstantPoolIndex, FieldHandle, FieldHandleInde...
the_stack
mod common; use std::fs::{self, File}; use std::io::{self, BufRead, BufReader, Cursor}; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use std::str::FromStr; use assert_cmd::cargo::CommandCargoExt; use inferno::flamegraph::color::{BackgroundColor, PaletteMap}; use inferno::flamegraph::{self, Dire...
the_stack
//! This library provides a type for storing `multipart/form-data` data, as well as functions //! to stream (read or write) such data over HTTP. //! //! `multipart/form-data` format as described by [RFC 7578](https://tools.ietf.org/html/rfc7578). //! HTML forms with enctype=`multipart/form-data` `POST` their data in th...
the_stack
use lazy_static::lazy_static; use nng::*; use serde::{Deserialize, Serialize}; use std::collections::HashSet; use std::io::BufWriter; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::Arc; use std::time; use crate::metrics::{ self, GooseErrorMetricAggregate, GooseErrorMetrics, GooseRequest...
the_stack
//! Reading and writing of messages using the //! [packed stream encoding](https://capnproto.org/encoding.html#packing). use alloc::string::ToString; use core::{mem, ptr, slice}; use crate::io::{Read, BufRead, Write}; use crate::serialize; use crate::Result; use crate::message; struct PackedRead<R> where R: BufRead ...
the_stack
//! Runtime library calls. //! //! Note that Wasm compilers may sometimes perform these inline rather than //! calling them, particularly when CPUs have special instructions which compute //! them directly. //! //! These functions are called by compiled Wasm code, and therefore must take //! certain care about some thi...
the_stack
use std::collections::{BTreeMap, BTreeSet, VecDeque}; use bumpalo::Bump; use libeir_util_datastructures::pooled_entity_set::{EntitySet, EntitySetPool}; use super::BFnvHashMap; use libeir_ir::{Block, CallKind, OpKind, Value, ValueKind}; use libeir_ir::{Function, LiveBlockGraph, LiveValues}; use log::trace; use sup...
the_stack
pub type c_char = i8; pub type wchar_t = i32; pub const O_DIRECT: ::c_int = 0x4000; pub const O_DIRECTORY: ::c_int = 0x10000; pub const O_NOFOLLOW: ::c_int = 0x20000; pub const O_LARGEFILE: ::c_int = 0o0100000; pub const MAP_32BIT: ::c_int = 0x40; // Syscall table pub const SYS_restart_syscall: ::c_long = 0; pub con...
the_stack
use std::collections::{hash_map::Entry, HashMap, VecDeque}; use std::pin::Pin; use std::sync::Arc; use std::task::{Context, Poll}; use std::time::Duration; use futures::prelude::*; use slog::{debug, error, o, trace, warn}; use super::SubnetServiceMessage; use beacon_chain::{BeaconChain, BeaconChainTypes}; use eth2_li...
the_stack
extern crate libc; #[macro_use] extern crate lazy_static; extern crate time; extern crate toml; #[macro_use] extern crate serde_derive; #[macro_use] extern crate log; extern crate env_logger; extern crate serde_json; extern crate serde; //extern crate jni; //extern crate jvmti_sys; extern crate resp; extern crate timer...
the_stack
mod protocol; use crate::codec::RequestResponseCodec; use crate::{RequestId, EMPTY_QUEUE_SHRINK_THRESHOLD}; pub use protocol::{ProtocolSupport, RequestProtocol, ResponseProtocol}; use futures::{channel::oneshot, future::BoxFuture, prelude::*, stream::FuturesUnordered}; use libp2p_core::upgrade::{NegotiationError, Up...
the_stack
use std::{collections::HashMap, fmt::Debug, sync::Arc}; use http::header::{HeaderMap, AUTHORIZATION, SERVER}; use log::{debug, trace}; use maybe_async::maybe_async; use serde::{Deserialize, Serialize}; use serde_json::Value; use uclient::ClientExt; use url::Url; use crate::{response::ArangoResult, ClientError}; use ...
the_stack
use std::collections::BTreeMap; use std::io; use std::io::{Cursor, Write}; use byteorder::{BigEndian, WriteBytesExt}; use serde::Deserializer; use serde_json::Value; use super::serde::DocumentVisitor; use super::{ByteCounter, DocumentsBatchIndex, DocumentsMetadata, Error}; use crate::FieldId; /// The `DocumentsBatch...
the_stack
use std::{ cell::{Ref, RefCell, RefMut}, rc::Rc, }; use crate::prelude::*; use glam::*; use itertools::Itertools; use slotmap::{SecondaryMap, SlotMap}; use smallvec::SmallVec; /// Implements indexing traits so the mesh data structure can be used to access /// vertex, face or halfedge information using ids as...
the_stack
//! Cloud-based implementation of an EndBASIC storage drive. use crate::service::*; use crate::storage::{Drive, DriveFactory, DriveFiles, FileAcls, Metadata}; use async_trait::async_trait; use std::cell::RefCell; use std::collections::BTreeMap; use std::io; use std::rc::Rc; use std::str; /// A drive backed by a remot...
the_stack
use std::path::{Path, PathBuf}; use anyhow::{bail, Context, Result}; use crate::{ common::{self, ControllerOpt}, stats::{self, BlkioDeviceStat, BlkioStats, StatsProvider}, }; use super::controller::Controller; use oci_spec::runtime::LinuxBlockIo; const CGROUP_BFQ_IO_WEIGHT: &str = "io.bfq.weight"; const CGR...
the_stack
use std::collections::HashMap; use std::fmt::Write; use druid::kurbo::{Affine, BezPath, PathEl, Point, Rect, Shape}; use lopdf::content::{Content, Operation}; use lopdf::{Document, Object, Stream}; use crate::cubic_path::CubicPath; use crate::design_space::DPoint; use crate::edit_session::EditSession; use crate::pat...
the_stack
use std::collections::HashMap; use std::convert::TryInto; use std::io::{Read, Write}; use std::mem::size_of; use std::net::{IpAddr, Ipv4Addr, SocketAddr, TcpStream, ToSocketAddrs}; use std::sync::{Arc, Condvar, Mutex}; use crate::{Result, SysCall, SysCallResult, PID, TID}; mod mem; pub use mem::*; mod threading; pub...
the_stack
extern crate libc; extern crate libloading; extern crate notify; extern crate tempdir; use libloading::Library; use notify::{RecommendedWatcher, Watcher}; use std::env; use std::fs; use std::path::{Path, PathBuf}; use std::sync::mpsc::{channel, Receiver, Sender}; use std::sync::Arc; use std::thread; use std::time::Dur...
the_stack
#[macro_use] extern crate itertools; #[macro_use] extern crate lazy_static; #[macro_use] extern crate maplit; #[macro_use] extern crate matches; extern crate hoodlum_parser; extern crate lalrpop_util; extern crate regex; pub mod sequence; pub mod verilog; pub mod walker; pub use hoodlum_parser::{ParseError, ast, hdl_...
the_stack
//! Used by operations to retrieve all `AdminServiceEvent` instances in the database that match //! the specified event IDs. use std::collections::HashMap; use std::convert::TryFrom; use diesel::{prelude::*, types::HasSqlType}; use super::AdminServiceStoreOperations; use crate::admin::store::{ diesel::{ ...
the_stack
pub mod arch_32; pub mod arch_64; pub mod arch_64_nanboxed; pub use self::arch_32::Encoding32; pub use self::arch_64::Encoding64; pub use self::arch_64_nanboxed::Encoding64Nanboxed; use core::convert::{TryFrom, TryInto}; use core::fmt::{Binary, Debug}; use core::hash::Hash; use core::mem; use crate::Tag; #[derive(D...
the_stack
use arrow::buffer::Buffer; use std::ops::Range; /// An arrow-compatible mutable bitset implementation /// /// Note: This currently operates on individual bytes at a time /// it could be optimised to instead operate on usize blocks #[derive(Debug, Default)] pub struct BitSet { /// The underlying data /// //...
the_stack
use std::fmt; use std::marker::PhantomData; use std::mem; use std::time::{Duration, Instant}; use channel::{self, Receiver, Sender}; use context::Context; use err::{RecvError, SelectTimeoutError, SendError, TrySelectError}; use smallvec::SmallVec; use utils; use flavors; /// Temporary data that gets initialized duri...
the_stack
use crate::math; use std::{borrow::Cow, cmp::Ordering, fmt::Write}; #[derive(Clone, Debug)] pub struct PerGen { period: u16, generator: u16, num_cycles: u16, } impl PerGen { pub fn new(period: u16, generator: u16) -> Self { Self { period, generator, num_cycl...
the_stack
use std::ffi::c_void; use bitflags::bitflags; use block::IntoConcreteBlock; use cacao::foundation::NSNumber; use cocoa::base::{id, nil, BOOL, YES}; use objc::msg_send; use std::mem::ManuallyDrop; #[link(name = "AVFAudio", kind = "framework")] extern "C" {} pub struct AUAudioUnit { reference: id, } impl AUAudio...
the_stack
use std::cmp::{max, min}; use std::collections::BTreeMap; use std::slice; use std::time::{SystemTime, UNIX_EPOCH}; use syscall::data::{Map, Stat, TimeSpec}; use syscall::error::{Error, Result, EBADF, EINVAL, EISDIR, ENOMEM, EPERM}; use syscall::flag::{ F_GETFL, F_SETFL, MODE_PERM, O_ACCMODE, O_APPEND, O_RDONLY, O_...
the_stack
use core_graphics; // TODO(dustin): use only the things i need use self::core_graphics::display::*; use self::core_graphics::event::*; use self::core_graphics::event_source::*; use crate::macos::keycodes::*; use crate::{Key, KeyboardControllable, MouseButton, MouseControllable}; use objc::runtime::Class; use std::os...
the_stack
use cgmath::prelude::*; use cgmath::{vec2, vec4, Basis2, Decomposed, Matrix2, Vector2, Vector4}; type Vec2 = Vector2<f32>; type Vec4 = Vector4<f32>; type Mat2 = Matrix2<f32>; type Bas2 = Basis2<f32>; type Dec2 = Decomposed<Vec2, Bas2>; use num_complex::Complex32; use std::f32; use std::f32::consts::*; use std::slice...
the_stack
use proc_macro2::TokenStream; use quote::{quote, ToTokens}; use syn::{GenericArgument, GenericParam, Ident, Type, Visibility}; #[allow(clippy::wildcard_imports)] use crate::codegen::sanitization::*; use crate::parser::meta_types::IdentTypeMaybeDefault; pub(crate) enum BuilderFieldKind { Required, TryOptional,...
the_stack
use std::{collections::HashSet, convert::TryFrom, env, fmt::Debug, thread, time::Duration}; use proptest::{collection::vec, prelude::*}; use proptest_derive::Arbitrary; use zebra_chain::{ amount::Amount, at_least_one, fmt::{DisplayToDebug, SummaryDebug}, orchard, primitives::{Groth16Proof, ZkSnark...
the_stack
use std::error::Error; use std::str; use std::time::Instant; use std::fs::File; use std::io::{BufRead, BufReader}; use std::ffi::CString; use coitrees::{COITree, IntervalNode, SortedQuerent}; extern crate fnv; use fnv::FnvHashMap; extern crate clap; use clap::{Arg, App}; extern crate libc; type GenericError = Box<d...
the_stack
use std::borrow::Cow; use std::mem::ManuallyDrop; use std::ops::Deref; use crate::error::Error; use crate::extensions::Extensions; use crate::ser::{Chunk, SerializerState}; use crate::{Descriptor, Event, Serialize}; use super::{MapEmitter, SeqEmitter, SerializeHandle, StructEmitter}; /// The driver allows serializin...
the_stack
mod api; use api::*; use num_traits::*; use xous_ipc::Buffer; use xous::{msg_blocking_scalar_unpack, msg_scalar_unpack}; use core::sync::atomic::{AtomicBool, Ordering}; #[cfg(any(target_os = "none", target_os = "xous"))] mod implementation { use utralib::generated::*; use crate::api::*; use susres::{RegMa...
the_stack
use crate::prelude::*; use ast::IdMap; use enso_text::unit::*; // ================ // === Text API === // ================ /// Update IdMap to reflect the recent code change. pub fn apply_code_change_to_id_map( id_map: &mut IdMap, change: &enso_text::text::Change<Bytes, String>, code: &str, ) { // ...
the_stack
use crate::graph::graph_buffer::PhysicalBufferId; use crate::graph::graph_image::{PhysicalImageId, PhysicalImageViewId}; use crate::graph::{ RenderGraphBufferSpecification, RenderGraphImageSpecification, RenderGraphPlan, SwapchainSurfaceInfo, }; use crate::{BufferResource, ImageResource, ImageViewResource, Reso...
the_stack
use either::Either; use itertools::Itertools; use llvm_ir::instruction::{BinaryOp, InlineAssembly}; use llvm_ir::types::NamedStructDef; use llvm_ir::*; use log::{debug, info}; use std::convert::TryInto; use std::fmt; // Rust 1.51.0 introduced its own `.reduce()` on the main `Iterator` trait. // So, starting with 1.51....
the_stack
#[cfg(feature = "cbordata")] use cbordata::{self as cbor, Cbor, Cborize, FromCbor, IntoCbor}; #[allow(unused_imports)] use std::collections::hash_map::{DefaultHasher, RandomState}; use std::{ collections::BTreeMap, convert::TryInto, ffi, fs, hash::{BuildHasher, Hash, Hasher}, io::{self, ErrorKind, ...
the_stack
//! ## Simple & Performant Serialization with RPC //! Performance of Protocol Buffers with flexibility of JSON //! //! [Github](https://github.com/ClickSimply/NoProto) | [Crates.io](https://crates.io/crates/no_proto) | [Documentation](https://docs.rs/no_proto) //! //! ### Features //! - Zero dependencies //! - Zero...
the_stack
/// Check macros provides a convient way to check if things are available in a stream of a process. /// /// It falls into a corresponding branch when a pattern was matched. /// It runs checks from top to bottom. /// It doesn't wait until any of them be available. /// If you want to wait until any of the input available...
the_stack
use std::os::raw::{c_char, c_uint}; use std::{ ffi::{c_void, CStr, CString}, mem::MaybeUninit, }; use cust::context::ContextHandle; use crate::{error::Error, optix_call, sys}; type Result<T, E = Error> = std::result::Result<T, E>; /// A certain property belonging to an OptiX device. #[non_exhaustive] #[deriv...
the_stack
use super::error::{ErrorKind, Result, ResultExt}; use super::header::{decode, encode, match_field}; use super::{Message, Topic}; use crate::rosmsg::RosMsg; use crate::util::lossy_channel::{lossy_channel, LossyReceiver, LossySender}; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use crossbeam::channel::{bo...
the_stack
use glutin::event_loop::{ControlFlow, EventLoop}; use glutin::window::WindowId; use crate::keyboard::{scan_to_code, vcode_to_code, vk_to_key}; use crate::window::Window; use tuix_core::{BoundingBox, Units, Widget}; use tuix_core::{Entity, State, PropSet}; use tuix_core::{MouseButton, MouseButtonState}; use tuix_co...
the_stack
extern crate util; use std::os::unix::io::RawFd; use std::sync::{Arc, Mutex}; use strum::VariantNames; use crate::qmp::qmp_schema::{ CacheOptions, ChardevInfo, Cmd, CmdLine, DeviceProps, Events, FileOptions, GicCap, IothreadInfo, KvmInfo, MachineInfo, MigrateCapabilities, PropList, QmpCommand, QmpEvent, ...
the_stack
use std::convert::TryFrom; use diesel::{prelude::*, Connection, SqliteConnection}; use log::*; use tari_dan_core::{ models::{HotStuffMessageType, QuorumCertificate, Signature, TariDanPayload, TreeNodeHash, ViewId}, storage::chain::{ChainDbBackendAdapter, DbInstruction, DbNode, DbQc}, }; use crate::{ error...
the_stack
use protobuf::Message; use crate::circuit::handlers::create_message; use crate::circuit::routing::RoutingTableReader; use crate::hex::parse_hex; use crate::network::dispatch::{DispatchError, Handler, MessageContext, MessageSender, PeerId}; use crate::peer::{PeerAuthorizationToken, PeerTokenPair}; use crate::protos::ci...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] ...
the_stack
use arrayref::array_ref; use num::BigInt; use std::io; use std::net; use std::string::FromUtf8Error; use super::blob::Blob; use super::decimal::Decimal; use crate::error; use crate::frame::FromCursor; use crate::types::{ try_f32_from_bytes, try_f64_from_bytes, try_i16_from_bytes, try_i32_from_bytes, try_i64_fr...
the_stack
use super::keyframe_core::*; use crate::storage::storage_api::*; use crate::storage::file_properties::*; use crate::traits::*; use ::desync::*; use flo_stream::*; use futures::future; use futures::prelude::*; use futures::stream::{BoxStream}; use std::sync::*; use std::time::{Duration}; use std::collections::{HashMa...
the_stack
use std::collections::{HashMap, HashSet, VecDeque}; use std::net::SocketAddr; use std::time::Duration; use slab::Slab; use mio::net::TcpListener; pub use mio::Token; use mio::*; use mio_extras::channel; use ws::connection::{ConnEvent, Connection}; use declarative_dataflow::server::Request; use declarative_dataflow:...
the_stack
use crate::{ config::Config, crash::CrashManager, feedback::Feedback, fuzzer_log::set_fuzzer_id, prepare_exec_env, spawn_syz, stats::Stats, util::stop_soon, }; use anyhow::Context; use healer_core::{ corpus::CorpusWrapper, gen::{gen_prog, minimize}, mutation::mutate, prog::Prog, relation::Re...
the_stack
extern crate winit; #[macro_use] pub extern crate vulkano; #[macro_use] pub extern crate vulkano_shaders; extern crate arc_swap; extern crate crossbeam; pub extern crate ilmenite; extern crate image; extern crate num_cpus; extern crate ordered_float; extern crate parking_lot; pub mod atlas; pub mod image_view; pub mod...
the_stack
use std::cmp::min; use std::fmt::Display; use std::ops::{BitAnd, BitOr, BitXor, Not, Shl, Shr}; pub trait Register: Sized + Clone + Default + Display + Not<Output = Self> + BitAnd<Output = Self> + BitOr<Output = Self> + BitXor<Output = Self> + Shl<Self, Output = Self> + Shr<Self...
the_stack
use std::collections::HashMap; use std::convert::{AsRef, TryFrom}; use std::fmt::{self, Debug, Display}; use std::path::{Path, PathBuf}; use http::header::{self, HeaderMap, HeaderName, HeaderValue}; use http::{Error as HttpError, StatusCode, Uri}; use log::{debug, trace, warn}; use serde::Deserialize; use super::tran...
the_stack
use super::{ TypedAstNode, TypedAstNodeContent, TypedDeclaration, TypedFunctionDeclaration, TypedImplTrait, TypedStorageDeclaration, }; use crate::{ error::*, parse_tree::{ParseProgram, Purity, TreeType}, semantic_analysis::{ namespace::{self, Namespace}, TypedModule, }, type...
the_stack
use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion, Fun}; #[allow(unused_imports)] //Depending on the build config this might be unused use failure::bail; use failure::Fallible; #[allow(unused_imports)] //Depending on the build config this might be unused use std::process::Child; use tracers...
the_stack
use crate::error::{Error, Result}; use crate::join::{Join, JoinKind, JoinOp, QualifiedJoin}; use crate::op::{Op, OpMutVisitor}; use crate::query::QuerySet; use crate::rule::expr_simplify::{update_simplify_nested, NullCoalesce}; use crate::rule::RuleEffect; use crate::setop::{Setop, SetopKind}; use std::collections::Has...
the_stack
extern crate cpython; use cpython::{FromPyObject, PyObject, PyResult, Python}; use granne::{self, Dist, Index}; use std::cell::RefCell; use std::path::Path; mod embeddings; mod variants; use variants::WordDict; const DEFAULT_MAX_SEARCH: usize = 200; const DEFAULT_NUM_ELEMENTS: usize = 10; py_module_initializer!(gr...
the_stack
#![no_std] extern crate alloc; #[macro_use] extern crate cfg_if; #[macro_use] extern crate terminal_print; extern crate log; extern crate memory; extern crate getopts; extern crate hpet; extern crate kernel_config; extern crate tsc; extern crate memory_structs; extern crate apic; extern crate runqueue; use alloc::str...
the_stack
use super::*; #[rustfmt::skip] pub(crate) static tbl_slice_depth_P: [[u8;16];5] = [ /* gop_size = 2 */ [ FRM_DEPTH_2, FRM_DEPTH_1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ], /* gop_size = 4 */ [ FRM_DEPTH_3, FRM_DEPTH_2, FRM_DEPTH_3, FRM_DEPTH_1, 0xFF, 0xFF, 0...
the_stack
use rand::{distributions::Uniform, rngs::StdRng, Rng}; use std::sync::Arc; use crate::shape::{HitRecord, Ray, Shape}; const SCORE_THRESHOLD: f64 = 0.85; /// A geometric shape with a bounding box (needed for kd-tree intersections) pub trait Bounded: Shape { /// Returns the shape's bounding box fn bounding_box...
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
//! System call numbers for x86-64 FreeBSD. pub const SYSCALL : usize = 0; pub const EXIT : usize = 1; pub const FORK : usize = 2; pub const READ : usize = 3; pub const WRITE : usize = 4; pub const OPEN ...
the_stack
pub struct ListGatewayRoutesPaginator< 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_gateway_routes_input::Builder, } impl<C, M, R>...
the_stack
use core::arch::aarch64::*; use num_complex::Complex; use crate::array_utils::{RawSlice, RawSliceMut}; // Read these indexes from an NeonArray and build an array of simd vectors. // Takes a name of a vector to read from, and a list of indexes to read. // This statement: // ``` // let values = read_complex_to_array!(i...
the_stack
use std::iter::Iterator; use std::fmt; use std::sync::Arc; use std::any::Any; use std::ops::{Deref, DerefMut}; use std::cell::RefCell; use std::io; pub trait Paging: Send { type Item; fn next_page(&mut self) -> Option<Vec<Self::Item>>; } impl<D, T: Iterator<Item=Vec<D>> + Send> Paging for T { type Item =...
the_stack
mod gdt; mod mptable; use std::fs::File; use std::io::{Read, Seek, SeekFrom}; use std::sync::Arc; use address_space::{AddressSpace, GuestAddress}; use util::byte_code::ByteCode; use super::bootparam::{BootParams, RealModeKernelHeader, UNDEFINED_ID}; use super::{X86BootLoader, X86BootLoaderConfig}; use super::{ B...
the_stack
use std::cell::RefCell; use std::collections::{HashMap, HashSet}; use std::marker::PhantomData; use std::rc::{Rc, Weak}; use std::fmt::Write; use std::ops::DerefMut; use itertools::Itertools; #[macro_use] mod colors; pub mod cardinality; mod dbg; pub mod matchers; #[macro_use] pub mod clone; pub mod type_info; pub ...
the_stack
clippy::too_many_lines, clippy::cast_possible_wrap, clippy::cast_sign_loss )] use std::{collections::HashSet, sync::Arc}; use arrow::{ array::{self, Array, ArrayDataBuilder, ArrayRef, PrimitiveBuilder}, buffer::MutableBuffer, datatypes::{self, ArrowNativeType, ArrowNumericType, ArrowPrimitiveType,...
the_stack
pub(crate) mod bsw; pub(crate) mod eco; pub(crate) mod me; pub(crate) mod mode; pub(crate) mod pinter; pub(crate) mod pintra; pub(crate) mod sad; pub(crate) mod sbac; pub(crate) mod tbl; pub(crate) mod tq; pub(crate) mod util; use super::api::frame::*; use super::api::*; use super::def::*; use super::df::*; use super:...
the_stack
//! That is, if we have identifiers `a`, `b` with `a != b` then we can always construct //! an identifier `c` s.t. `a < c < b` or `a > c > b`. //! //! The GList and List CRDT's rely on this property so that we may always insert elements //! between any existing elements. use core::cmp::Ordering; use core::fmt; use nu...
the_stack
use std::collections::HashSet; use std::hash::Hash; use std::time::{SystemTime, UNIX_EPOCH}; use super::{BlockTime, Height}; /// Maximum time adjustment between network and local time (70 minutes). pub const MAX_TIME_ADJUSTMENT: TimeOffset = 70 * 60; /// Maximum a block timestamp can exceed the network-adjusted time...
the_stack
use crate::core::{char, cmp, num, str}; #[cfg(feature = "lfn")] use crate::core::{iter, slice}; use crate::io; use crate::io::prelude::*; use crate::io::{ErrorKind, SeekFrom}; #[cfg(all(not(feature = "std"), feature = "alloc", feature = "lfn"))] use alloc::vec::Vec; use crate::dir_entry::{ DirEntry, DirEntryData, ...
the_stack
mutable_transmutes, non_camel_case_types, non_snake_case, non_upper_case_globals )] use std::io::{Read, Seek, SeekFrom}; use crate::{info, warn}; use std::ffi::CStr; use std::ptr; use super::dpx_mfileio::tt_mfgets; use bridge::{InFile, TTInputFormat}; use libc::{strchr, strlen, strtol}; /* Don't forget...
the_stack
mod printer_options; pub use printer_options::*; use crate::format_element::{ ConditionalGroupContent, Group, LineMode, List, PrintMode, VerbatimKind, }; use crate::intersperse::Intersperse; use crate::{FormatElement, GroupId, Printed, SourceMarker, TextRange}; use rome_rowan::TextSize; use std::iter::{once, Rev...
the_stack
use bitcoin; use bitcoin::hashes::{hash160, sha256, Hash}; use super::{stack, Error, Stack}; use miniscript::context::NoChecks; use {Miniscript, MiniscriptKey}; /// Attempts to parse a slice as a Bitcoin public key, checking compressedness /// if asked to, but otherwise dropping it fn pk_from_slice(slice: &[u8], requ...
the_stack
use self::conf::{ ResolvConf, ResolvOptions, SearchSuffix, ServerConf, Transport, }; use crate::base::iana::Rcode; use crate::base::message::Message; use crate::base::message_builder::{ AdditionalBuilder, MessageBuilder, StreamTarget, }; use crate::base::name::{ToDname, ToRelativeDname}; use crate::base::octets...
the_stack
//! SQL lexer. //! //! This module lexes SQL according to the rules described in the ["Lexical //! Structure"] section of the PostgreSQL documentation. The description is //! intentionally not replicated here. Please refer to that chapter as you //! read the code in this module. //! //! Where the PostgreSQL documentati...
the_stack
mod annotations; mod config; mod descriptor; mod index; mod manifest; mod version; use std::fmt::Display; use serde::{Deserialize, Serialize}; pub use annotations::*; pub use config::*; pub use descriptor::*; pub use index::*; pub use manifest::*; pub use version::*; /// Media types used by OCI image format spec. V...
the_stack
use kernel::hil; use kernel::utilities::cells::{OptionalCell, VolatileCell}; use kernel::utilities::registers::interfaces::{Readable, Writeable}; use kernel::utilities::registers::{register_bitfields, ReadOnly, ReadWrite, WriteOnly}; use kernel::utilities::StaticRef; use kernel::ErrorCode; #[repr(C)] struct AdcRegiste...
the_stack
#[macro_use] mod auxiliary; use core::{ marker::{PhantomData, PhantomPinned}, pin::Pin, }; use pin_project_lite::pin_project; #[test] fn projection() { pin_project! { #[project = StructProj] #[project_ref = StructProjRef] #[project_replace = StructProjReplace] #[derive(Defa...
the_stack
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the...
the_stack
mod macros; use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree}; use quote::quote; use std::iter::FromIterator; use syn::Type; #[test] fn test_mut_self() { syn::parse_str::<Type>("fn(mut self)").unwrap(); syn::parse_str::<Type>("fn(mut self: ())").unwrap(); syn::parse_...
the_stack
use crate::{ ActiveMintConfig, ActiveMintConfigs, Error, Ledger, LedgerMetrics, MetadataStore, MetadataStoreSettings, MintConfigStore, MintTxStore, TxOutStore, }; use lmdb::{ Database, DatabaseFlags, Environment, EnvironmentFlags, RoTransaction, RwTransaction, Transaction, WriteFlags, }; use mc_common::...
the_stack
use std::ops::Deref; use pos::{BytePos, Spanned}; use symbol::Symbol; use types::{self, Alias, AliasData, ArcType, Type, TypeEnv}; pub trait DisplayEnv { type Ident; fn string<'a>(&'a self, ident: &'a Self::Ident) -> &'a str; } pub trait IdentEnv: DisplayEnv { fn from_str(&mut self, s: &str) -> Self::Id...
the_stack
use std::{ any::Any, cell::{Ref, RefCell, RefMut}, collections::BTreeMap, fmt::Debug, marker::PhantomData, ops::Deref, rc::Rc, }; use crate::lua_engine::lua_stdlib; use mlua::{FromLua, Lua, ToLua}; use super::*; /// The key of a channel is the type of element the channel is attaching data...
the_stack
use crate::behaviour::gossipsub_scoring_parameters::GREYLIST_THRESHOLD as GOSSIPSUB_GREYLIST_THRESHOLD; use serde::Serialize; use std::time::Instant; use strum::AsRefStr; use tokio::time::Duration; lazy_static! { static ref HALFLIFE_DECAY: f64 = -(2.0f64.ln()) / SCORE_HALFLIFE; } /// The default score for new pee...
the_stack
//! Expressions use std::collections::HashMap; use crate::common::errors::*; use crate::common::name::Name; use crate::common::score::Result; use crate::common::source::{Span, Spanned}; use crate::common::Verbosity; use crate::add_ctx::AddContext; use crate::hir; use crate::make_ctx::MakeContext; use crate::overload...
the_stack
use crate::account_storage::AccountStorage; use crate::Account; use crate::AccountManager; use anyhow::Result; use starcoin_account_api::error::AccountError; use starcoin_account_api::AccountPublicKey; use starcoin_config::RocksdbConfig; use starcoin_crypto::keygen::KeyGen; use starcoin_crypto::{SigningKey, ValidCrypto...
the_stack
use whitebox_raster::*; use crate::tools::*; use num_cpus; use std::env; use std::f64; use std::io::{Error, ErrorKind}; use std::path; use std::sync::mpsc; use std::sync::Arc; use std::thread; /// This tool can be used to reduce the grid resolution of a raster by a user specified amount. For example, using /// an aggr...
the_stack
//! Tests for `StreamManager` use super::*; use crate::{ connection::{ self, finalization::Provider, InternalConnectionId, InternalConnectionIdGenerator, Limits as ConnectionLimits, }, contexts::{ConnectionApiCallContext, OnTransmitError, WriteContext}, endpoint, recovery::RttEstima...
the_stack
// Copyright (C) 2020-2022 Metaverse.Network & Bit.Country . // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LIC...
the_stack
#![warn(missing_docs)] use std::borrow::Cow; use std::fmt; use std::ops::Deref; #[cfg(test)] use similar_asserts::assert_eq; /// An error returned when parsing source maps. #[derive(Debug)] pub struct ParseSourceMapError(sourcemap::Error); impl fmt::Display for ParseSourceMapError { fn fmt(&self, f: &mut fmt::F...
the_stack
#![allow(unsafe_code)] use crate::{ ciphersuite::CipherSuite, errors::*, key_exchange::tripledh::TripleDH, opaque::*, slow_hash::NoOpHash, tests::mock_rng::CycleRng, *, }; use alloc::string::ToString; use alloc::vec; use alloc::vec::Vec; use core::slice::from_raw_parts; use curve25519_dalek::{ristretto::Ristre...
the_stack
pub mod read; pub mod write; pub mod crop; pub mod pixel_vec; pub mod recursive; // pub mod channel_groups; use crate::meta::header::{ImageAttributes, LayerAttributes}; use crate::meta::attribute::{Text, LineOrder}; use half::f16; use crate::math::{Vec2, RoundingMode}; use crate::compression::Compression; use smallve...
the_stack
use std::marker::PhantomData; use bellperson::{ gadgets::{ boolean::{AllocatedBit, Boolean}, multipack::pack_bits, num::AllocatedNum, }, Circuit, ConstraintSystem, LinearCombination, SynthesisError, }; use blstrs::Scalar as Fr; use ff::{Field, PrimeFieldBits}; use filecoin_hashers::...
the_stack
use alloc::boxed::Box; use core::{ mem::ManuallyDrop, slice, }; use funty::IsNumber; use tap::pipe::Pipe; use crate::{ index::BitIdx, order::{ BitOrder, Lsb0, }, ptr::{ BitPtr, BitSpan, Mut, }, slice::BitSlice, store::BitStore, vec::BitVec, }; mod api; mod iter; mod ops; mod traits; pub use iter...
the_stack
pub mod context; pub mod invoke; pub mod job; use std::{ env, ffi::OsStr, fs, path::{Path, PathBuf}, process::Command, }; use console::style; use failure::{bail, format_err, ResultExt}; use futures::future; use itertools::Itertools; use rand::{distributions::Alphanumeric, seq::SliceRandom, thread_...
the_stack
use super::{sockaddr_un, SocketAddr}; use crate::convert::TryFrom; use crate::io::{self, IoSlice, IoSliceMut}; use crate::marker::PhantomData; use crate::mem::{size_of, zeroed}; use crate::os::unix::io::RawFd; use crate::path::Path; use crate::ptr::{eq, read_unaligned}; use crate::slice::from_raw_parts; use crate::sys:...
the_stack
use graphql_parser::Pos; use std::collections::{HashMap, HashSet}; use std::hash::{Hash, Hasher}; use std::sync::Arc; use std::time::Instant; use std::{collections::hash_map::DefaultHasher, convert::TryFrom}; use graph::data::graphql::{ ext::{DocumentExt, TypeExt}, ObjectOrInterface, }; use graph::data::query:...
the_stack