text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use crate::{ connection::{ peer_id_registry::{ testing::{id, peer_registry}, PeerIdRegistrationError, PeerIdRegistrationError::{ ExceededActiveConnectionIdLimit, ExceededRetiredConnectionIdLimit, InvalidNewConnectionId, }, ...
the_stack
use crate::encoder::enums::*; use crate::encoder::ops::*; use crate::encoder::ops_tables::*; use crate::encoder::*; #[cfg(feature = "mvex")] use crate::mvex::get_mvex_info; #[cfg(any(not(feature = "no_evex"), feature = "mvex"))] use crate::tuple_type_tbl::get_disp8n; use crate::*; use alloc::boxed::Box; use alloc::vec:...
the_stack
#![feature(assert_matches)] use std::assert_matches::assert_matches; use itertools::Itertools; use jujutsu_lib::backend::{ConflictPart, TreeValue}; use jujutsu_lib::commit_builder::CommitBuilder; use jujutsu_lib::repo_path::{RepoPath, RepoPathComponent}; use jujutsu_lib::rewrite::rebase_commit; use jujutsu_lib::tree:...
the_stack
//! This crate provides a parser and encoder for PEM-encoded binary data. //! PEM-encoded binary data is essentially a beginning and matching end //! tag that encloses base64-encoded binary data (see: //! https://en.wikipedia.org/wiki/Privacy-enhanced_Electronic_Mail). //! //! This crate's documentation provides a few ...
the_stack
#![deny(missing_debug_implementations)] #![deny(missing_docs)] // allow future warnings that can't be fixed while keeping 1.0 compatibility #![allow(unknown_lints)] #![allow(bare_trait_objects)] #![allow(ellipsis_inclusive_range_patterns)] /// Local macro to avoid `std::try!`, deprecated in Rust 1.39. macro_rules! try...
the_stack
use crate::helpers::{ config::get as get_config, framework::infer_from_package_json as infer_framework, }; use crate::Result; use clap::Parser; use colored::Colorize; use serde::Deserialize; use std::{ collections::HashMap, fmt::Write, fs::{read_dir, read_to_string}, panic, path::{Path, PathBuf}, process...
the_stack
//! Utilities to generate inbound payment information in service of invoice creation. use alloc::string::ToString; use bitcoin::hashes::{Hash, HashEngine}; use bitcoin::hashes::cmp::fixed_time_eq; use bitcoin::hashes::hmac::{Hmac, HmacEngine}; use bitcoin::hashes::sha256::Hash as Sha256; use chain::keysinterface::{Key...
the_stack
use crate::c; use core::{ num::Wrapping, ops::{Add, AddAssign, BitAnd, BitOr, BitXor, Not, Shr}, }; #[cfg(not(any(target_arch = "aarch64", target_arch = "arm", target_arch = "x86_64")))] pub(super) extern "C" fn GFp_sha256_block_data_order( state: &mut super::State, data: *const u8, num: c::size_t,...
the_stack
#![allow(non_camel_case_types)] #![allow(dead_code)] pub type __uint8_t = ::std::os::raw::c_uchar; pub type __int32_t = ::std::os::raw::c_int; pub type __uint32_t = ::std::os::raw::c_uint; pub type __int64_t = ::std::os::raw::c_long; pub type __uint64_t = ::std::os::raw::c_ulong; pub type zxio_flags_t = u32; pub type ...
the_stack
use std::cmp::Reverse; use std::ops::Index; use super::SegmentWriter; use crate::schema::{Field, Schema}; use crate::{DocId, IndexSortByField, Order, SegmentOrdinal, TantivyError}; /// Struct to provide mapping from new doc_id to old doc_id and segment. #[derive(Clone)] pub(crate) struct SegmentDocIdMapping { new...
the_stack
use crate::{ access::ModuleAccess, file_format::{SignatureToken, StructDefinition, StructFieldInformation, StructHandleIndex}, CompiledModule, }; use anyhow::{anyhow, bail, Result}; use move_core_types::{ identifier::IdentStr, language_storage::{ModuleId, StructTag, TypeTag}, resolver::ModuleRes...
the_stack
use crate::{ counter::{Counter, Saturating}, random, recovery::{ bandwidth::RateSample, bbr, bbr::{congestion, data_rate, data_volume, round, BbrCongestionController}, CongestionController, }, time::Timestamp, }; use core::{convert::TryInto, time::Duration}; use num_r...
the_stack
use crate::RTSPFilterResult; use crate::RTSPMedia; use crate::RTSPSessionMedia; 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; use std::mem::trans...
the_stack
use config::RunMode; use error::*; use path_abs::PathAbs; use std::collections::HashMap; use std::fs; use std::path::Path; use std::path::PathBuf; use walkdir::{DirEntry, WalkDir}; pub type PathList = Vec<PathBuf>; /// Return a list of paths for the given run mode. pub fn get_paths(mode: &RunMode) -> PathList { m...
the_stack
// Parity Bridges Common 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. // Parity Bridges Common is distributed in the hope that i...
the_stack
#![allow(unused)] use std::cell::Cell; use std::fmt::{self, Debug, Formatter}; use std::hash::{Hash, Hasher}; use std::net::SocketAddr; use bip_util::bt::NodeId; use bip_util::test; use chrono::{Duration, DateTime, UTC}; // TODO: Should remove as_* functions and replace them with from_requested, from_responded, etc ...
the_stack
use { crate::log_if_err, crate::message::Message, crate::node::Node, anyhow::{format_err, Context, Result}, async_trait::async_trait, async_utils::hanging_get::client::HangingGetStream, fidl_fuchsia_settings as fsettings, fuchsia_component::client::connect_to_protocol, fuchsia_inspec...
the_stack
// #![cfg_attr(coverage, no_coverage)] use std::time::Duration; use crate::errors::Error; use async_std::{prelude::*, task::JoinHandle}; use http_types::{ headers::{self, HeaderValue, ToHeaderValues}, StatusCode, }; use serde::{Deserialize, Serialize}; use tide::Response; use tremor_runtime::system::World; p...
the_stack
use crate::arch; #[cfg(feature = "acpi")] use crate::arch::x86_64::kernel::acpi; use crate::arch::x86_64::kernel::irq::IrqStatistics; #[cfg(all(target_os = "hermit", feature = "smp"))] use crate::arch::x86_64::kernel::smp_boot_code::SMP_BOOT_CODE; use crate::arch::x86_64::kernel::IRQ_COUNTERS; use crate::arch::x86_64::...
the_stack
use std::convert::TryInto; use std::path::PathBuf; use std::sync::Arc; use std::time::{Duration, Instant}; use futures::prelude::*; use reqwest::StatusCode; use thiserror::Error; use tokio::fs::File; use tokio::io::AsyncWriteExt; use crate::cache::CacheStatus; use crate::utils::futures::{self as future_utils, m, meas...
the_stack
use observability_deps::tracing::warn; use std::{ borrow::{Borrow, Cow}, iter::FromIterator, mem, num::NonZeroU64, sync::Arc, }; /// Address of the chunk within the catalog #[derive(Debug, Clone, Eq, PartialEq)] pub struct PartitionAddr { /// Database name pub db_name: Arc<str>, /// Wh...
the_stack
use crate::prelude::*; use crate::component::breadcrumbs::breadcrumb; use crate::component::breadcrumbs::GLYPH_WIDTH; use crate::component::breadcrumbs::TEXT_SIZE; use crate::component::breadcrumbs::VERTICAL_MARGIN; use enso_frp as frp; use ensogl::application; use ensogl::application::shortcut; use ensogl::applicati...
the_stack
use crate::ast; use crate::collections::{HashMap, HashSet}; use crate::ir; use crate::ir::{IrBudget, IrCompile, IrCompiler, IrInterpreter, IrQuery}; use crate::parsing::Opaque; use crate::shared::{Consts, Gen, Items}; use crate::{ CompileError, CompileErrorKind, CompileVisitor, Id, ImportEntryStep, NoopCompileVisit...
the_stack
use std::borrow::{Borrow, Cow}; use std::error::Error as StdError; use std::fmt; use std::hash::{Hash, Hasher}; use std::mem; use std::ops::{Deref, Index, RangeFull}; use std::ptr; use std::slice::{self, SliceIndex}; use std::str::{self, FromStr}; use ascii::{AsAsciiStr, AsAsciiStrError, AsciiStr}; #[derive(Clone, Co...
the_stack
use super::*; use crate::{ abi_stability::{ abi_checking::{AbiInstability,push_err}, }, const_utils::log2_usize, std_types::{RSlice,RVec,RString}, }; /////////////////////////// /// The parts of the layout of an enum,that don't depend on generic parameters. #[repr(C)] #[derive(Copy, Clone, ...
the_stack
#[macro_use] extern crate lazy_static; extern crate regex; use regex::{Captures, Regex}; #[rustfmt::skip] const SMALL_WORDS: &[&str] = &[ "a", "an", "and", "as", "at", "but", "by", "en", "for", "if", "in", "of", "on", "or", "the", "to", "v[.]?", ...
the_stack
use std::fmt; use std::iter; use std::mem; use std::ptr; use std::collections::BTreeMap; use rand::{thread_rng, Rng}; #[cfg(test)] use quickcheck::quickcheck; const DEFAULT_LEVEL: usize = 4; type Link<T> = Option<Box<T>>; #[derive(Debug)] struct Rawlink<T> { p: *mut T, } impl<T> Clone for Rawlink<T> { fn...
the_stack
//! An implementation of a set of items that utilize the `BinaryValue` trait. //! //! `ValueSetIndex` implements a set, storing an element as a value and using //! its hash as a key. The given section contains methods related to `ValueSetIndex` //! and iterators over the items of this set. use std::marker::PhantomData...
the_stack
pub enum Command { set_trap_table = 0, mmu_update = 1, set_gdt = 2, stack_switch = 3, set_callbacks = 4, fpu_taskswitch = 5, sched_op_compat = 6, platform_op = 7, set_debugreg = 8, get_debugreg = 9, update_...
the_stack
use { anyhow::Result, cm_rust::{ChildDecl, ComponentDecl, EnvironmentDecl}, moniker::{AbsoluteMoniker, AbsoluteMonikerBase, ChildMonikerBase, PartialChildMoniker}, routing::environment::{DebugRegistry, EnvironmentExtends, RunnerRegistry}, serde::{Deserialize, Serialize}, std::{ collectio...
the_stack
use crate::{api, usr}; use crate::api::console::Style; use crate::api::prompt::Prompt; use alloc::string::ToString; use alloc::string::String; use alloc::vec::Vec; use alloc::format; use alloc::vec; use alloc::collections::BTreeMap; use alloc::rc::Rc; use core::fmt; use core::num::ParseFloatError; use float_cmp::approx...
the_stack
use std::cell::Cell; /// A node inside a DOM-like tree. pub struct Node<'a, T: 'a> { parent: Cell<Option<&'a Node<'a, T>>>, previous_sibling: Cell<Option<&'a Node<'a, T>>>, next_sibling: Cell<Option<&'a Node<'a, T>>>, first_child: Cell<Option<&'a Node<'a, T>>>, last_child: Cell<Option<&'a Node<'a,...
the_stack
use futures::future::Either::*; use futures::stream::StreamExt; use std::process::Stdio; use std::{io::BufRead, str, time::Duration}; use tokio::io::{self, AsyncBufReadExt}; use tokio::prelude::*; use tokio::process::{Child, Command}; use tokio::sync::mpsc::{self, Receiver, Sender}; const BUBBLEWRAP_ARGS: &str = "--ro...
the_stack
//! Type-safe bindings for Zircon channel objects. use crate::ok; use crate::{ size_to_u32_sat, usize_into_u32, AsHandleRef, Handle, HandleBased, HandleDisposition, HandleInfo, HandleOp, HandleRef, ObjectType, Peered, Rights, Status, Time, }; use fuchsia_zircon_sys as sys; use std::mem::{self, MaybeUninit}; i...
the_stack
use super::opcodes::Opcode; use std::{fmt, mem, slice}; use std::convert::TryInto; #[repr(packed)] pub struct Inquiry { pub opcode: u8, /// bits 7:2 are reserved, bit 1 (CMDDT) is obsolete, bit 0 is EVPD pub evpd: u8, pub page_code: u8, /// big endian pub alloc_len: u16, pub control: u8, } ...
the_stack
use std::{ collections::BTreeSet, convert::{TryFrom, TryInto}, mem, }; use proc_macro2::TokenStream; use quote::{quote, ToTokens}; use syn::{ parse::{Parse, ParseStream}, parse_quote, punctuated::Punctuated, DeriveInput, Field, Generics, Ident, Lifetime, Lit, LitStr, Token, Type, }; use cr...
the_stack
use super::*; use serde_json::json; #[test] fn configure_hardware_bad_single() { let mut mock = MockStream::default(); let service = service_new!(mock); let query = r#"mutation { configureHardware(config: [{option: LOG_ERROR_DATA}]) { config, errors, ...
the_stack
use crate::{u256::U256, Binary}; use crunchy::unroll; /// Lehmer update matrix /// /// Signs are implicit, the boolean `.4` encodes which of two sign /// patterns applies. The signs and layout of the matrix are: /// /// ```text /// true false /// [ .0 -.1] [-.0 .1] /// [-.2 .3] [ .2 -.3] ///...
the_stack
extern crate mmap; extern crate time; extern crate timely; extern crate getopts; use timely::progress::timestamp::RootTimestamp; use timely::dataflow::operators::{Input, Operator, LoopVariable, ConnectLoop}; use timely::dataflow::channels::pact::Exchange; mod typedrw; mod graphmap; mod sorting; use graphmap::GraphMMa...
the_stack
use coarse_prof::profile; use nalgebra as na; use rendology::{basic_obj, BasicObj}; use crate::edit::{Editor, Mode, Piece}; use crate::exec::TickTime; use crate::machine::{grid, Block, PlacedBlock}; use crate::render::{self, Stage}; pub const GRID_OFFSET_Z: f32 = 0.00; impl Editor { pub fn render(&mut self, out...
the_stack
use crate::builtins::Builtin; use crate::operations::{BinOp, OpKind}; use crate::syntax::*; use itertools::Itertools; use std::fmt::{self, Display}; // There is a one-to-one correspondence between the formatter and the grammar. Each phase is // named after a corresponding grammar group, and the structure of the format...
the_stack
use kajiya_backend::{ ash::vk, vulkan::{image::*, ray_tracing::RayTracingAcceleration, shader::ShaderSource}, }; use kajiya_rg::{self as rg, SimpleRenderPass}; use super::{ ircache::IrcacheRenderState, wrc::WrcRenderState, GbufferDepth, PingPongTemporalResource, }; pub struct RtdgiRenderer { temporal_...
the_stack
use crate::{ gpu::{BackgroundAndWindowDataSelect, InterruptRequest, ObjectSize, TileMap, GPU}, interrupt_flags::InterruptFlags, joypad::{self, Joypad}, timer::{Frequency, Timer}, utils::bit, }; pub const BOOT_ROM_BEGIN: usize = 0x00; pub const BOOT_ROM_END: usize = 0xFF; pub const BOOT_ROM_SIZE: us...
the_stack
use super::typescript::*; use super::util::*; use crate::event::rewrite_events; use crate::event::RewriteParseEvents; use crate::lexer::{LexContext, ReLexContext}; use crate::parser::rewrite_parser::{RewriteMarker, RewriteParser}; use crate::parser::{expected_token, ParserProgress, RecoveryResult}; use crate::syntax::a...
the_stack
use crate::common::*; use crate::ButtonEvent; const ICON_CHECK: &str = "\u{2713}"; //TODO const CHECKBOX_STYLE: &str = r#" checkbox { font: icons, width: 20px; height: 20px; background-color: white; border-width: 1px; border-color: black; border-radius: 3px;...
the_stack
use crate::state::{GraphQL, GraphQLType}; use graphql_parser::schema; /// Convert Text to String. /// See https://github.com/graphql-rust/graphql-parser/blob/master/src/common.rs#L12-L28 fn convert_text_to_string<'a, T>(text: &T::Value) -> String where T: schema::Text<'a>, { String::from(text.as_ref()) } ///...
the_stack
#![cfg_attr(feature = "dma", doc = "[`DMA`](crate::dmac)")] #![cfg_attr(not(feature = "dma"), doc = "`DMA`")] //! or the [`spi_future`](super::super::spi_future) module. //! //! # Variations by [`Capability`] //! //! The implementations in this module also seek to optimize as much as possible //! based on the `Capabili...
the_stack
use crate::{ contexts::{OnTransmitError, WriteContext}, interval_set::IntervalSet, transmission, }; use bytes::Bytes; use core::convert::TryInto; use s2n_quic_core::{ack, packet::number::PacketNumber, varint::VarInt}; mod buffer; mod traits; mod transmissions; pub mod writer; pub use buffer::View; use s2n...
the_stack
use { crate::utils::{canonical_ident, get_named_fields, NamedField}, proc_macro2::TokenStream, quote::ToTokens, syn::{Data, DataEnum, DataStruct, DeriveInput, Fields, FieldsUnnamed}, }; pub fn impl_decode_macro(ast: &DeriveInput) -> TokenStream { match &ast.data { Data::Struct(data_struct) ...
the_stack
use crate::prelude::*; use voladdress::*; pub mod mode3; // TODO: modules for the other video modes /// [DISPCNT](https://problemkaputt.de/gbatek.htm#lcdiodisplaycontrol) pub const DISPCNT: VolAddress<DisplayControl, Safe, Safe> = unsafe { VolAddress::new(0x0400_0000) }; /// [DISPSTAT](https://problemkaputt.de/gba...
the_stack
use core::mem::size_of; use crate::memmem::{util::memcmp, vector::Vector, NeedleInfo}; /// The minimum length of a needle required for this algorithm. The minimum /// is 2 since a length of 1 should just use memchr and a length of 0 isn't /// a case handled by this searcher. pub(crate) const MIN_NEEDLE_LEN: usize = 2...
the_stack
use crate::datastore::{ arrow::{meta_conversion::get_dynamic_meta_flatbuffers, padding}, error::Result, prelude::*, }; pub trait GrowableArrayData: Sized + std::fmt::Debug { fn _len(&self) -> usize; fn _null_count(&self) -> usize; fn _null_buffer(&self) -> Option<&[u8]>; fn _get_buffer(&sel...
the_stack
use num_complex::Complex; use num_traits::Zero; use crate::array_utils; use crate::common::{fft_error_inplace, fft_error_outofplace}; use crate::{twiddles, FftDirection}; use crate::{Direction, Fft, FftNum, Length}; /// Naive O(n^2 ) Discrete Fourier Transform implementation /// /// This implementation is primarily u...
the_stack
use std::fs::File; use std::io::Read; use clap::{App, Arg}; use rgb::RGB8; use pio::common::{ChromaSubsampling, ChromaSubsamplingOption, CompressResult, Format, Image}; use pio::output::Output; use pio::{jpeg, png, ssim, webp}; type LossyCompressor = Box<dyn Fn(&Image, u8, ChromaSubsampling) -> CompressResult>; type...
the_stack
use std::ops::Neg; use crate::{ collections::TypedUsize, crypto_tools::{ constants, k256_serde, paillier::{ secp256k1_modulus, to_bigint, to_scalar, utils::{member_of_mod, member_of_mul_group}, zk::ZkSetup, Ciphertext, EncryptionKey, Plaintext, Ra...
the_stack
use self::Register8::*; use self::Direction::*; use std::mem::transmute; use std::fmt; use std::ops::Deref; use std::error; use emumisc::WrappingExtra; pub type Address = u16; #[derive(Copy, Clone, PartialEq)] pub enum EmulationStatus { Normal, InfiniteLoop( Address ) } #[derive(Copy, Clone, PartialEq)] pu...
the_stack
use proc_macro2::{Span, TokenStream}; use quote::{quote, quote_spanned, ToTokens}; use std::str::FromStr; use syn::spanned::Spanned; use crate::dummy; use crate::internals::ast::{Container, Data, Field, Style, Variant}; use crate::internals::{attr, Ctxt, Derive}; pub fn expand_mutatable(input: &syn::DeriveIn...
the_stack
use lark_debug_with::DebugWith; use lark_entity::{Entity, EntityData, ItemKind, LangItem, MemberKind}; use lark_hir as hir; use lark_intern::{Intern, Untern}; use lark_parser::{ParserDatabase, ParserDatabaseExt}; use lark_query_system::LarkDatabase; use std::collections::HashMap; use std::fmt; pub struct EvalState { ...
the_stack
use super::Path; use super::connection::{Connection, Socket, ctx, secure, socket}; use super::router::Router; use futures::{Async, Future, Poll, Stream, future}; use rustls; use std::{io, net}; use std::cell::RefCell; use std::rc::Rc; use std::sync::Arc; use std::time::Duration; use tacho; use tokio_core::net::{TcpList...
the_stack
// TODO: Use a type alias for the index type, and switch out usize for u32 // Suppose usize is u64. If there are k := 2^(63)+1 leaves, then there are a total of 2(k-1) + 1 = // 2(2^(63))+1 = 2^(64)+1 nodes in the tree, which is outside the representable range. So our upper // bound is 2^(63) leaves, which gives a tree...
the_stack
use arrow::array::{build_compare, ArrayData, DynComparator}; use arrow::compute::{SortColumn, SortOptions}; use arrow::error::{ArrowError, Result as ArrowResult}; // use snafu::Snafu; use std::cmp::Ordering; use std::iter::Iterator; use std::ops::Range; /// Given a list of key columns, find partition ranges that woul...
the_stack
use core_traits::{ Entid, ValueType, TypedValue, ValueTypeSet, }; use mentat_core::{ Cloned, HasSchema, }; use edn::query::{ NonIntegerConstant, Pattern, PatternValuePlace, PatternNonValuePlace, SrcVar, Variable, }; use clauses::{ ConjoiningClauses, }; use types::...
the_stack
use std::marker::Copy; use std::convert::{TryInto, TryFrom}; use std::fmt::Debug; use std::ops::{AddAssign, SubAssign}; // Small subtrees at the bottom of the tree are stored in sorted order // This gives the upper bound on the size of such subtrees. Performance isn't // super sensitive, but is worse with a very small...
the_stack
use std::cell::RefCell; use std::fmt; use std::fmt::Display; use std::rc::Rc; use gtk::gdk::{EventMask, ModifierType}; use gtk::{cairo, gdk, glib}; use gtk::{DrawingArea, EventBox}; use gtk::prelude::*; use crate::error::Error; use crate::nvim_bridge::{ GridLineSegment, GridScrollArea, GridScrollRegion, ModeInfo...
the_stack
use serde_derive::Serialize; use std::{ collections::{BTreeMap, HashMap}, io, }; use chrono::Local; use reqwest::Url; use shipcat_definitions::Manifest; use std::env; pub use raftcat::*; fn find_team(owners: &Owners, slug: &str) -> Option<Squad> { owners.squads.get(slug).cloned() } // ------------------...
the_stack
use { crate::unaligned_view::UnalignedView, core::mem::size_of, zerocopy::{ByteSlice, ByteSliceMut, FromBytes, LayoutVerified, Unaligned}, }; pub struct BufferReader<B> { buffer: Option<B>, bytes_read: usize, } impl<B: ByteSlice> BufferReader<B> { pub fn new(bytes: B) -> Self { BufferR...
the_stack
use cast; use common_failures::prelude::*; use image::{ImageBuffer, Rgba, RgbaImage}; use std::fmt; use std::slice; #[cfg(test)] use test_util::rgba_hex; /// A type which can be used as a pixel in a `Pixmap`. pub trait Pixel: Clone + Copy + fmt::Debug + 'static { /// This is basically just `Default::default`. We ...
the_stack
use crate::error::{Error, Result}; use crate::join::JoinKind; use crate::op::Op; use indexmap::IndexMap; use smallvec::SmallVec; use std::collections::HashMap; use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, Deref, DerefMut}; use xngin_expr::{Expr, QueryID}; // Support at most 31 tables in single join graph. ...
the_stack
use query_engine_tests::*; //TODO: which tests to keep and which ones to delete???? Some do not really test the compound unique functionality // TODO(dom): All failing except one #[test_suite] mod create_inside_update { use query_engine_tests::{assert_error, run_query, run_query_json, DatamodelWithParams}; use...
the_stack
use super::{read_link_one, CanonicalPath, CowComponent}; use crate::fs::{ dir_options, errors, open_unchecked, path_has_trailing_dot, path_has_trailing_slash, stat_unchecked, FollowSymlinks, MaybeOwnedFile, Metadata, OpenOptions, OpenUncheckedError, }; #[cfg(any(target_os = "android", target_os = "linux"))] use...
the_stack
//! `DnsResponse` wraps a `Message` and any associated connection details use std::future::Future; use std::io; use std::ops::{Deref, DerefMut}; use std::pin::Pin; use std::task::{Context, Poll}; use futures_channel::mpsc; use futures_util::ready; use futures_util::stream::Stream; use crate::error::{ProtoError, Prot...
the_stack
use crate::graph::{self, Edge, GraphNode}; use crate::node::{self, Node, SerdeNode}; use petgraph::visit::GraphBase; use quote::ToTokens; use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, HashMap, HashSet}; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::{fs, io, ops}; use thiserror:...
the_stack
use crate::bounding_volume::{self, BoundingVolume, AABB}; use crate::math::{Isometry, Point, Vector, DIM}; use crate::partitioning::{BVHImpl, BVT}; use crate::procedural; use crate::query::{ Contact, ContactKinematic, ContactPrediction, ContactPreprocessor, LocalShapeApproximation, NeighborhoodGeometry, }; use ...
the_stack
use types::*; use libc::{c_int, c_uint, c_char, c_ushort, c_void}; use ffi; use channel; use sound_group; use vector; use fmod_sys; use fmod_sys::{MemoryUsageDetails, Sys}; use std::mem::transmute; use std::fs::File; use std::mem; use std::slice; use std::default::Default; use byteorder::{WriteBytesExt, LittleEndian}; ...
the_stack
#![allow(clippy::cast_precision_loss)] use crate::prelude::*; use crate::registry::{ mfa, Aggr as AggrRegistry, FResult, FunctionError, TremorAggrFn, TremorAggrFnWrapper, }; use crate::Value; use halfbrown::hashmap; use hdrhistogram::Histogram; use sketches_ddsketch::{Config as DDSketchConfig, DDSketch}; use std::...
the_stack
extern crate tropix; extern crate rustc_serialize; extern crate time; use tropix::bittrex::bittrex::*; use rustc_serialize::{Decodable, Decoder}; use rustc_serialize::json::{self, ToJson, Json}; use std::io; use std::io::Read; use std::thread::sleep; use std::time::Duration; use std::io::{BufRead}; #[derive(Clone, ...
the_stack
use crate::{ExchangeRates, NodeStore}; use bytes::Bytes; use futures::TryFutureExt; use interledger_errors::*; use interledger_http::{deserialize_json, HttpAccount}; use interledger_packet::Address; use interledger_rates::ExchangeRateStore; use interledger_router::RouterStore; use interledger_service::{Account, Account...
the_stack
use std::sync::{atomic::AtomicBool, atomic::Ordering::Relaxed, Arc}; use std::{convert::TryFrom, num::NonZeroU16, time::Duration}; use futures::FutureExt; use ntex::util::{ByteString, Bytes, Ready}; use ntex::{server, service::fn_service, time::sleep}; use ntex_mqtt::v5::{ client, codec, error, ControlMessage, Ha...
the_stack
extern crate rand; extern crate curve25519_dalek; extern crate merlin; extern crate bulletproofs; //extern crate spock; use curve25519_dalek::scalar::Scalar; use bulletproofs::r1cs::{ConstraintSystem, R1CSError, R1CSProof, Variable, Prover, Verifier}; use bulletproofs::{BulletproofGens, PedersenGens}; use merlin::Tran...
the_stack
extern crate proc_macro; use { proc_macro::TokenStream, quote::{quote, quote_spanned, TokenStreamExt}, syn::{ parse, parse::{Parse, ParseStream}, Attribute, Block, Error, Ident, ItemFn, LitBool, LitInt, LitStr, Signature, Token, }, }; #[derive(Clone, Copy)] enum FunctionType { ...
the_stack
use assert_matches::assert_matches; use candid::Encode; #[cfg(feature = "test")] use comparable::{Changed, I32Change, MapChange, OptionChange, StringChange, U64Change, VecChange}; use futures::future::FutureExt; use ic_base_types::PrincipalId; use ic_crypto_sha::Sha256; use ic_nns_common::pb::v1::{NeuronId, ProposalId}...
the_stack
#![allow(dead_code)] use std::mem::swap; /// # Arguments /// * `m` `1 <= m` /// /// # Returns /// x mod m /* const */ pub(crate) fn safe_mod(mut x: i64, m: i64) -> i64 { x %= m; if x < 0 { x += m; } x } /// Fast modular by barrett reduction /// Reference: https://en.wikipedia.org/wiki/Barrett_...
the_stack
#![feature(custom_derive, plugin, libc, conservative_impl_trait, unboxed_closures)] extern crate libc; extern crate tickgrinder_util; extern crate redis; extern crate time; extern crate futures; extern crate postgres; extern crate uuid; extern crate serde_json; #[macro_use] extern crate serde_derive; use std::env; us...
the_stack
use std::future::Future; use std::pin::Pin; use std::time::Duration; use locutus_runtime::ContractKey; use crate::message::InnerMessage; use crate::operations::op_trait::Operation; use crate::operations::OpInitialization; use crate::{ config::PEER_TIMEOUT, contract::{ContractError, ContractHandlerEvent, Store...
the_stack
use crate::{BusAccessInfo, BusDevice, IrqLevelEvent}; use acpi_tables::{aml, aml::Aml}; use base::{ error, warn, AsRawDescriptor, Descriptor, Event, PollToken, RawDescriptor, Tube, WaitContext, }; use power_monitor::{BatteryStatus, CreatePowerMonitorFn}; use remain::sorted; use std::sync::Arc; use std::thread; use ...
the_stack
use timely::progress::Timestamp; use timely::dataflow::operators::Input as TimelyInput; use timely::dataflow::operators::input::Handle; use timely::dataflow::scopes::ScopeParent; use ::Data; use ::difference::Semigroup; use collection::{Collection, AsCollection}; /// Create a new collection and input handle to contro...
the_stack
use std::fmt; use std::fmt::Write as _; use std::future::Future; use std::io; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; use std::pin::Pin; use std::sync::Arc; use actix::prelude::*; use actix_files; use actix_web::{self, FromRequest}; use actix_web::dev::{Service, ServiceRequest, ServiceResponse, Transform}; use act...
the_stack
use std::collections::{HashMap, HashSet}; use std::convert::TryInto; use std::hash::Hasher; use std::sync::Arc; use crate::bitcoind::BitcoindRpc; use crate::config::WalletConfig; use crate::db::{ BlockHashKey, PegOutTxSignatureCI, PegOutTxSignatureCIPrefix, PendingPegOutKey, PendingPegOutPrefixKey, PendingTran...
the_stack
use ffi; use libc; use AnyLuaValue; use AsLua; use AsMutLua; use LuaContext; use LuaRead; use Push; use PushGuard; use PushOne; use Void; use std::marker::PhantomData; use std::fmt::Display; use std::mem; use std::ptr; macro_rules! impl_function { ($name:ident, $($p:ident),*) => ( /// Wraps a type that i...
the_stack
use rustc::hir::def_id::DefId; use rustc::mir; use rustc::ty::{self, TypeVariants, Ty}; use rustc::ty::layout::HasDataLayout; use syntax::codemap::Span; use syntax::attr; use rustc_target::spec::abi::Abi; use constraints::Constraint; use error::{EvalError, EvalResult}; use eval_context::{EvalContext, StackPopCleanup, ...
the_stack
use std::convert::TryFrom; use std::time::Duration as StdDuration; use criterion::Bencher; use criterion_cycles_per_byte::CyclesPerByte; use time::ext::{NumericalDuration, NumericalStdDuration}; use time::Duration; setup_benchmark! { "Duration", // region: is_{sign} fn is_zero(ben: &mut Bencher<'_, Cycle...
the_stack
use crate::cx_win32::*; use crate::cx::*; use winapi::shared::guiddef::GUID; use winapi::shared::minwindef::{TRUE, FALSE}; use winapi::shared::{dxgi, dxgi1_2, dxgitype, dxgiformat, winerror}; use winapi::um::{d3d11, d3dcommon, d3dcompiler}; use winapi::Interface; use wio::com::ComPtr; use std::mem; use std::ptr; use s...
the_stack
use near_sdk_sim::{call, init_simulator, to_yocto, view}; use near_sdk::json_types::{U128}; use near_sdk::serde_json::Value; use ref_farming::{HRSimpleFarmTerms}; use crate::common::utils::*; use crate::common::views::*; use crate::common::actions::*; use crate::common::init::deploy_farming; mod common; #[test] fn ...
the_stack
pub fn analyze( bytes: &[u8], address: u32, v7: bool, tags: &[(u32, Tag)], ) -> (Vec<i32>, Vec<i32>, bool, bool, Option<u64>) { macro_rules! bug { ($first:expr) => { panic!( "BUG: unknown instruction {:02x}{:02x}", $first[1], $first[0] ...
the_stack
use std::ops::{BitAnd, BitOr, Not}; #[derive(Debug)] pub enum Error { ZeroDivision, InvalidConversionToInt, IntegerOverflow, } impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::ZeroDivision => write!(f, "integ...
the_stack
use super::*; use bee_message::{ address::Address, input::Input, parents::Parents, payload::Payload, prelude::TransactionId, }; use chronicle_common::metrics::CONFIRMATION_TIME_COLLECTOR; use std::sync::Arc; #[async_trait::async_trait] impl<H: ChronicleBrokerScope> EventLoop<BrokerHandle<H>> for Co...
the_stack
use super::*; use crate::format; use pest::error::Error; use pest::iterators::{Pair, Pairs}; use pest::RuleType; use regex::Regex; use serde::{Deserialize, Serialize}; use std::result::Result; pub fn format_pairs<R: RuleType, O: Results>(out: O, pairs: Result<Pairs<R>, Error<R>>) -> O { let mut out = out; mat...
the_stack
use crate::{Dimension, Order, ShapeError, ErrorKind}; use crate::dimension::sequence::{Sequence, SequenceMut, Forward, Reverse}; #[inline] pub(crate) fn reshape_dim<D, E>(from: &D, strides: &D, to: &E, order: Order) -> Result<E, ShapeError> where D: Dimension, E: Dimension, { debug_assert_eq!(from.ndim...
the_stack
#![recursion_limit = "256"] mod hci; mod types; use { anyhow::{Context, Error}, argh::FromArgs, fuchsia_async as fasync, futures::StreamExt, hci::CommandChannel, hex::FromHex, types::*, }; #[derive(Debug, FromArgs)] /// Command line args struct Args { #[argh(switch, short = 'v')] ...
the_stack
use crate::JvmValue; pub struct InterpEvalStack { stack: Vec<JvmValue>, } impl InterpEvalStack { pub fn of() -> InterpEvalStack { InterpEvalStack { stack: Vec::new() } } pub fn push(&mut self, val: JvmValue) -> () { let s = &mut self.stack; s.push(val); } pub fn pop(&...
the_stack