text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use ntex::util::{ByteString, Bytes}; use super::{packet::*, UserProperty}; use crate::error::DecodeError; use crate::types::packet_type; use crate::utils::Decode; pub(super) fn decode_packet(mut src: Bytes, first_byte: u8) -> Result<Packet, DecodeError> { match first_byte { packet_type::PUBLISH_START..=pa...
the_stack
use std::{ error::Error as StdError, fmt, io, marker::PhantomData, mem, time::{ Duration, Instant, }, }; use bytes::{ BufMut, BytesMut, }; use channel::{ self, TryRecvError, TrySendError, }; use fluent_builder::FluentBuilder; use futures::{ Async, ...
the_stack
use rslint_parser::{ self as rl, ast::{self, Expr, ParameterList}, parse_expr, AstNode, SyntaxKind, SyntaxNodeExt, }; use std::cell::RefCell; use std::ops::Range; fn is_sole_child<N: AstNode>(n: &N, expect_len: usize) -> bool { let r: Range<usize> = Range::from(n.syntax().trimmed_range()); r.end - ...
the_stack
use urid::{Uri, UriBound}; mod cache; mod core_features; mod descriptor; pub use cache::FeatureCache; pub use core_features::*; pub use descriptor::FeatureDescriptor; use std::ffi::c_void; /// All threading contexts of LV2 interface methods. /// /// The [core LV2 specifications](https://lv2plug.in/ns/lv2core/lv2cor...
the_stack
use std::io; use std::collections::VecDeque; use pyo3::*; use futures::unsync::mpsc; use futures::{Async, Future, Poll}; use {TokioEventLoop, PyFuture, PyFuturePtr, PyTask, PyTaskPtr, pybytes}; use http::{self, pyreq, codec}; use http::pyreq::{PyRequest, PyRequestPtr, StreamReader, StreamReaderPtr}; use utils::{Class...
the_stack
#![allow(dead_code)] use super::{c_int, DWORD}; pub const ERROR_DIRECTORY_NOT_SUPPORTED: DWORD = 336; pub const ERROR_DRIVER_CANCEL_TIMEOUT: DWORD = 594; pub const ERROR_DISK_QUOTA_EXCEEDED: DWORD = 1295; pub const ERROR_RESOURCE_CALL_TIMED_OUT: DWORD = 5910; pub const FRS_ERR_SYSVOL_POPULATE_TIMEOUT: DWORD = 8014; p...
the_stack
use dates::Date; use dates::rules::RcDateRule; use math::interpolation::Interpolate; use data::divstream::DividendBootstrap; use data::divstream::DividendStream; use data::curves::RcRateCurve; use data::curves::RateCurve; use core::qm; /// Forward curve. This represents the expectation value of some asset over /// tim...
the_stack
#[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct Tag { /// <p>Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.</p> pub key: std::option::Option<std::string::String>, /// ...
the_stack
use cretonne_wasm::{ ModuleEnvironment, GlobalIndex, MemoryIndex, TableIndex, FunctionIndex, Table, Memory, Global, SignatureIndex, FuncTranslator, FuncEnvironment, GlobalValue }; use cretonne::prelude::{settings::{self, Flags}, types::*, InstBuilder, Signature}; use cretonne::codegen::{ ir::{self, ExternalName...
the_stack
mod util; use serde_json::json; use std::thread; use std::time::Duration; use util::SchedulerFixture; use utils::testing::ServiceListener; #[test] fn run_init_no_tasks() { let listener = ServiceListener::spawn("127.0.0.1", 9020); let _fixture = SchedulerFixture::spawn("127.0.0.1", 8020); thread::sleep(Du...
the_stack
use crate::error::{FendError, Interrupt}; use crate::num::real::{self, Real}; use crate::num::Exact; use crate::num::{Base, FormattingStyle}; use std::cmp::Ordering; use std::fmt; use std::ops::Neg; #[derive(Clone, PartialEq, Eq, Hash)] pub(crate) struct Complex { real: Real, imag: Real, } impl fmt::Debug for...
the_stack
use crate::{ error::ImlApiError, graphql::{get_fs_target_resources, Context, TargetResource}, }; use futures::TryStreamExt; use iml_postgres::sqlx::{self, Postgres, Transaction}; use juniper::{FieldError, Value}; use lazy_static::lazy_static; use regex::Regex; use std::collections::{HashMap, HashSet}; #[derive...
the_stack
use app_units; use font_kit; use font_kit::{family_name::FamilyName, font, source::SystemSource}; use super::properties::*; use std::collections::HashMap; use webrender::api::*; use super::properties::{Align, Position}; use self::shaper::GlyphMetric; use unicode_bidi::BidiClass; use unicode_bidi::BidiInfo; mod shaper...
the_stack
use std::cell::RefCell; use std::collections::BTreeMap; use std::io::Cursor; use std::net::{IpAddr, SocketAddr}; use std::rc::Rc; use std::sync::{ atomic::{AtomicUsize, Ordering}, Arc, }; use std::time::{Duration, Instant}; use futures_lite::{Stream, StreamExt}; use glommio::channels::channel_mesh::{MeshBuilde...
the_stack
use cosmwasm_bignumber::{Decimal256, Uint256}; use cosmwasm_std::{CanonicalAddr, Order, StdError, StdResult, Storage, Uint128}; use cosmwasm_storage::{singleton, singleton_read, Bucket, ReadonlyBucket}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::convert::TryInto; static KEY_CONFIG: &[u8] =...
the_stack
use std::cell::Cell; use crate::array::{Array, ArraySize}; use crate::bytecode::{ByteCode, InstructionStream, Opcode}; use crate::containers::{ Container, FillAnyContainer, HashIndexedAnyContainer, IndexedAnyContainer, IndexedContainer, SliceableContainer, StackAnyContainer, StackContainer, }; use crate::dict:...
the_stack
use std::cmp::max; use std::sync::Arc; use num_complex::Complex; use num_integer::Integer; use strength_reduce::StrengthReducedUsize; use transpose; use crate::array_utils; use crate::common::{fft_error_inplace, fft_error_outofplace}; use crate::{common::FftNum, FftDirection}; use crate::{Direction, Fft, Length}; //...
the_stack
use std::{cmp, error, fmt, ops}; use std::cmp::Ordering; use std::collections::hash_map; use std::collections::{HashMap, HashSet, VecDeque}; use std::convert::TryFrom; use std::hash::Hash; use std::net::{AddrParseError, IpAddr}; use std::num::ParseIntError; use std::str::FromStr; use std::sync::{Arc, RwLock}; use std::...
the_stack
use audiodecoder; use codecs::vorbis::VorbisHeaders; use container; use pixelformat::PixelFormat; use streaming::StreamReader; use timing::Timestamp; use videodecoder; use libc::{c_char, c_double, c_int, c_long, c_longlong, c_uchar, c_ulong, c_void, size_t}; use num::FromPrimitive; use num::iter::range; use std::ffi::...
the_stack
use std::fmt; use std::mem; use std::ptr::NonNull; use std::time::Duration; use std::sync::atomic::{AtomicUsize, Ordering}; use std::cmp; use coroutine::{Handle, HandleList}; use runtime::processor::Processor; use runtime::timer::Timeout; use sync::spinlock::Spinlock; #[repr(u8)] #[derive(Clone, Copy, Debug, Eq, Part...
the_stack
#[macro_use] extern crate error_chain; #[macro_use] extern crate log; #[macro_use] extern crate machine_manager; #[macro_use] extern crate vmm_sys_util; pub mod errors { error_chain! { links { AddressSpace(address_space::errors::Error, address_space::errors::ErrorKind); IntCtrl(devi...
the_stack
//! A pair Hidden Markov Model for calculating the probability that two sequences are related to //! each other. Depending on the used parameters, this can, e.g., be used to calculate the //! probability that a certain sequencing read comes from a given position in a reference genome. //! //! Time complexity: O(n * m) ...
the_stack
use super::constants::*; use super::adjust_state::*; use super::adjust_model::*; use super::adjust_control_point::*; use crate::menu::*; use crate::tools::*; use crate::model::*; use flo_ui::*; use flo_binding::*; use flo_animation::*; use futures::prelude::*; use futures::stream::{BoxStream}; use std::f32; use st...
the_stack
use std::collections::HashMap; use std::fs::File; use std::io; use std::path::Path; use super::manager::PackageManager; use crate::error::{Context, ErrorKind, Fallible, VoltaError}; use crate::layout::volta_home; use crate::platform::PlatformSpec; use crate::version::{option_version_serde, version_serde}; use fs_utils...
the_stack
use core::mem; use crate::ClearModp; use crate::SecretI64; use crate::ConstI32; use crate::Stack; use crate::{ __popint, __popsint, }; #[no_mangle] extern "C" fn __crash() -> ! { println!("CRASH requested"); std::process::exit(-1); } #[no_mangle] extern "C" fn __restart() -> ! { println!("RESTART requ...
the_stack
use crate::world::Direction; use alloc::vec::Vec; use rand::prelude::*; #[derive(Debug, PartialEq, Eq)] pub struct World {} #[derive(Debug)] pub struct Tile { pub val: Option<u64>, pub changed: bool, pub row: usize, pub col: usize, } impl Tile { pub fn new(row: usize, col: usize) -> Self { ...
the_stack
use super::{CodegenTest, ExpectedCHeader, ExpectedRustTokens, ExpectedSwiftCode}; use proc_macro2::TokenStream; use quote::quote; /// Verify that we use the `#[swift_bridge(args_into = (arg1, another_arg))]` attribute. mod function_args_into_attribute { use super::*; fn bridge_module_tokens() -> TokenStream {...
the_stack
use super::{Error, Result}; use crate::emitter::{self, ir::*}; use crate::string; use if_chain::if_chain; use itertools::Itertools; use ordered_float::OrderedFloat; use std::cmp::Ordering; use std::fmt; use std::sync::{Arc, Mutex}; #[derive(Debug, Clone)] pub enum Value { S(Ct, i64), U(Ct, u64), F32(Ordere...
the_stack
use bit::BitIndex; use super::memory::MemoryInterface; use super::{Core, REG_PC}; #[derive(Debug, Primitive, Eq, PartialEq)] pub enum AluOpCode { AND = 0b0000, EOR = 0b0001, SUB = 0b0010, RSB = 0b0011, ADD = 0b0100, ADC = 0b0101, SBC = 0b0110, RSC = 0b0111, TST = 0b1000, TEQ = ...
the_stack
use core::marker::PhantomData; use core::sync::atomic::{compiler_fence, Ordering}; use embassy::util::Unborrow; use embassy_hal_common::unborrow; use crate::gpio::sealed::Pin as _; use crate::gpio::{AnyPin, OptionalPin as GpioOptionalPin}; use crate::interrupt::Interrupt; use crate::pac; use crate::ppi::{Event, Task};...
the_stack
use sauron::{ html::{self, attributes::*, events::*, units::*, *}, Component, Node, }; use crate::{ app::{ self, tab_view::{self, TabView}, toolbar_view::{self, ToolbarView}, }, assets, }; use diwata_intel::{TableName, Window}; use diwata_intel::data_container::WindowData; ...
the_stack
use std::future::Future; use std::io; use std::io::{Read, Write}; use std::net::TcpStream; use std::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6, UdpSocket}; use std::net::{SocketAddr, TcpListener, ToSocketAddrs}; use std::os::unix::net::{SocketAddr as UnixSocketAddr, UnixDatagram, UnixListener, UnixStream}; us...
the_stack
use super::curve::*; use super::basis::*; use super::super::geo::*; /// Maximum number of iterations to perform when trying to improve the curve fit const MAX_ITERATIONS: usize = 4; // How far out of the error bounds we can be (as a ratio of the maximum error) and still attempt to fit the curve const FIT_ATTEMPT_RATI...
the_stack
pub struct Params { pub clkr: u8, pub clkf: u8, pub clkod: u8, pub bwadj: u8, } /* * The PLL included with the Kendryte K210 appears to be a True Circuits, Inc. * General-Purpose PLL. The logical layout of the PLL with internal feedback is * approximately the following: * * +---------------+ * ...
the_stack
#[macro_use] extern crate lazy_static; mod common; use address::Address; use clock::ChainEpoch; use common::*; use fil_types::StoragePower; use forest_actor::{ miner::{ApplyRewardParams, Method as MinerMethod}, reward::{ AwardBlockRewardParams, Method, State, ThisEpochRewardReturn, BASELINE_INITIAL_VA...
the_stack
use crate::utils::Atomic; use std::{ cell::Cell, mem::MaybeUninit, os::raw::c_int, ptr::{null_mut, NonNull}, sync::{ atomic::{AtomicPtr, AtomicUsize, Ordering}, Arc, Once, }, thread, }; pub use self::thread::ThreadId; thread_local! { static EXIT_JMP_BUF: Cell<Option<Jmp...
the_stack
/// This example shows a basic packet logger using libpnet extern crate pnet; use pnet::datalink::{self, NetworkInterface}; use pnet::packet::arp::ArpPacket; use pnet::packet::ethernet::{EtherTypes, EthernetPacket, MutableEthernetPacket}; use pnet::packet::icmp::{echo_reply, echo_request, IcmpPacket, IcmpTypes}; use ...
the_stack
use crate::def::*; use crate::region::*; fn evc_had_8x8( x: usize, y: usize, u: usize, v: usize, stride: usize, org: &PlaneRegion<'_, pel>, cur: &[pel], ) -> u32 { let mut satd = 0u32; let mut diff = [[0i32; 8]; 8]; let mut m1 = [[0; 8]; 8]; let mut m2 = [[0; 8]; 8]; let...
the_stack
mod address; pub mod error; mod parser; mod refs; mod state; #[cfg(test)] mod tests; #[cfg(feature = "tls")] pub mod tls; use log::trace; use serde::{Deserialize, Serialize}; use std::{ convert::Infallible, fmt, str::FromStr, sync::atomic::{AtomicU64, Ordering}, }; use tokio::sync::mpsc::Sender as Mpsc...
the_stack
use core::cell::Cell; use core::convert::TryFrom; use kernel::hil::ble_advertising; use kernel::hil::ble_advertising::RadioChannel; use kernel::utilities::cells::OptionalCell; use kernel::utilities::cells::TakeCell; use kernel::utilities::registers::interfaces::{Readable, Writeable}; use kernel::utilities::registers::{...
the_stack
use std::{ cmp::Ordering, convert::{TryFrom, TryInto}, hash::{Hash, Hasher}, marker::PhantomData, ops::RangeInclusive, }; use crate::serialization::{ZcashDeserialize, ZcashSerialize}; use byteorder::{ByteOrder, LittleEndian, ReadBytesExt, WriteBytesExt}; #[cfg(any(test, feature = "proptest-impl"))...
the_stack
//! Utilities for mobilecoind unit tests use crate::{ database::Database, monitor_store::{MonitorData, MonitorId}, payments::TransactionsManager, service::Service, }; use grpcio::{ChannelBuilder, EnvBuilder}; use mc_account_keys::{AccountKey, PublicAddress, DEFAULT_SUBADDRESS_INDEX}; use mc_common::log...
the_stack
use lsp_types::*; use pulldown_cmark::{Event, Parser, Tag}; pub const FACE_INFO_DEFAULT: &str = "InfoDefault"; pub const FACE_INFO_BLOCK_QUOTE: &str = "InfoBlockQuote"; pub const FACE_INFO_BLOCK: &str = "InfoBlock"; pub const FACE_INFO_HEADER: &str = "InfoHeader"; pub const FACE_INFO_LINK_MONO: &str = "InfoLinkMono";...
the_stack
use core; use cortex_m; use stm32f407; use smoltcp::{self, phy::{self, DeviceCapabilities}, time::Instant, wire::EthernetAddress}; const ETH_BUF_SIZE: usize = 1536; const ETH_NUM_TD: usize = 4; const ETH_NUM_RD: usize = 4; use ::config::ETH_PHY_ADDR; /// Transmit Descriptor representation /// /// * tdes0: ownership...
the_stack
use { crate::{bucket_api::BucketApi, bucket_stats::BucketMapStats, MaxSearch, RefCount}, solana_sdk::pubkey::Pubkey, std::{convert::TryInto, fmt::Debug, fs, path::PathBuf, sync::Arc}, tempfile::TempDir, }; #[derive(Debug, Default, Clone)] pub struct BucketMapConfig { pub max_buckets: usize, pub...
the_stack
use super::flat::FlatIndexImpl; use super::{ AssignSearchResult, CpuIndex, FromInnerPtr, Idx, Index, IndexImpl, NativeIndex, RangeSearchResult, SearchResult, }; use crate::error::Result; use crate::faiss_try; use crate::gpu::GpuResourcesProvider; use crate::metric::MetricType; use crate::selector::IdSelector; u...
the_stack
use crate::ui::boundaries::boundary_type; use crate::ClientId; use ansi_term::Colour::{Fixed, RGB}; use ansi_term::Style; use zellij_utils::pane_size::Viewport; use zellij_utils::zellij_tile::prelude::{client_id_to_colors, Palette, PaletteColor}; use unicode_width::{UnicodeWidthChar, UnicodeWidthStr}; use std::fmt::W...
the_stack
use crate::error::PowerManagerError; use crate::log_if_err; use crate::message::{Message, MessageReturn}; use crate::node::Node; use crate::shutdown_request::{RebootReason, ShutdownRequest}; use crate::temperature_handler::TemperatureFilter; use crate::types::{Celsius, Seconds}; use crate::utils::get_current_timestamp;...
the_stack
use crate::constant::ConstantRef; #[cfg(feature="llvm-9-or-greater")] use crate::debugloc::{DebugLoc, HasDebugLoc}; use crate::function::{CallingConvention, FunctionAttribute, ParameterAttribute}; use crate::name::Name; use crate::operand::Operand; use crate::predicates::*; use crate::types::{NamedStructDef, Type, Type...
the_stack
use byteorder::{NetworkEndian, ReadBytesExt, WriteBytesExt}; use bytes::{BufMut, BytesMut}; use fnv::FnvHashMap; use once_cell::sync::Lazy; use prost::Message as ProstMessage; use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::convert::{Into, TryFrom}; use std::io::Cursor; use std::net::{IpAddr, Ipv4Ad...
the_stack
//! Inv gates need to typecast circuit object to boolean circuit //! [Link to comment in EzPC Compiler](https://github.com/mpc-msri/EzPC/blob/da94a982709123c8186d27c9c93e27f243d85f0e/EzPC/EzPC/codegen.ml) use crate::ir::term::*; // use crate::target::aby::assignment::ilp::assign; use crate::target::aby::assignment::{s...
the_stack
use std::collections::hash_map::Entry; use std::collections::HashMap; use std::sync::Arc; use anyhow::Result; use crate::algorithms::compose::{IntervalSet, StateReachable}; use crate::algorithms::tr_compares::{ILabelCompare, OLabelCompare}; use crate::algorithms::{fst_convert_from_ref, tr_sort}; use crate::fst_impls:...
the_stack
use std::convert::TryFrom; use std::fs::File; use std::future::Future; use std::io::prelude::*; use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::pin::Pin; use std::sync::{Arc, Mutex}; use std::{mem, task, thread}; use syscall::data::Event; use syscall::Result; use crossbeam_channel::Receiver; use super::...
the_stack
use std::marker::PhantomData; use crate::error::{ProtoErrorKind, ProtoResult}; use super::BinEncodable; use crate::op::Header; // this is private to make sure there is no accidental access to the inner buffer. mod private { use crate::error::{ProtoErrorKind, ProtoResult}; /// A wrapper for a buffer that gua...
the_stack
#![no_std] #![feature(ptr_internals)] #![feature(unboxed_closures)] extern crate spin; extern crate multiboot2; extern crate alloc; #[macro_use] extern crate log; extern crate irq_safety; extern crate kernel_config; extern crate atomic_linked_list; extern crate xmas_elf; extern crate bit_field; #[cfg(target_arch = "x8...
the_stack
use crate::check_args; use crate::molt_ok; use crate::types::ContextID; use crate::Interp; use crate::MoltResult; use crate::ResultCode; use crate::Value; use std::env; use std::fs; use std::path::PathBuf; /// Executes the Molt test harness, given the command-line arguments, /// in the context of the given interpreter...
the_stack
use crate::warn; use crate::FromBEByteSlice; use super::dpx_numbers::GetFromFile; use super::dpx_sfnt::{sfnt_find_table_pos, sfnt_locate_table, sfnt_set_table}; use super::dpx_tt_table::{ tt_pack_head_table, tt_pack_hhea_table, tt_pack_maxp_table, tt_read_head_table, tt_read_hhea_table, tt_read_longMetrics, tt...
the_stack
mod common; use crate::edgekv::EdgeKV; use log::{debug, warn}; use std::sync::Arc; use serial_test::serial; const N_THREADS: usize = 4; const N_PER_THREAD: usize = 10; const N: usize = N_THREADS * N_PER_THREAD; // NB N should be multiple of N_THREADS const SPACE: usize = N; #[allow(dead_code)] const INTENSITY: usize...
the_stack
// #![deny(missing_docs)] pub mod intralinks; use crate::intralinks::{FQIdentifier, IntraLinkError}; use regex::RegexBuilder; use std::{ collections::HashSet, fmt, fs::{self, read_dir, File}, io::{self, Read}, path::{Path, PathBuf}, str::FromStr, }; use toml::{de::Error as TomlError, Value}; /// Name of ...
the_stack
use crate::process::message::Message; use anyhow::{bail, Context, Result}; use nix::{ sys::{socket, uio}, unistd::{self, Pid}, }; use serde::{Deserialize, Serialize}; use std::{ marker::PhantomData, os::unix::prelude::{AsRawFd, RawFd}, }; /// Channel Design /// /// Each of the main, intermediate, and i...
the_stack
use std::{borrow::Borrow, cmp::Ordering, ops::Range}; /// Native position inside a text document/string. Points to a valid position /// **before** the character inside a UTF8-encoded string. /// /// ## Why use [`Pos`] instead of raw `usize` offset /// /// This depends on the use-case. Often raw `usize` or a newtype wr...
the_stack
use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; use nix::{ sys::{socket, uio}, Result as NixResult, }; use crate::wire::{ArgumentType, Message, MessageParseError, MessageWriteError}; /// Maximum number of FD that can be sent in a single socket message pub const MAX_FDS_OUT: usize = 28; /// Max...
the_stack
pub struct DescribeBucketsPaginator< 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::describe_buckets_input::Builder, } impl<C, M, R> Desc...
the_stack
pub(crate) mod aggregates; mod aliases; pub(crate) mod analyze; mod bulk; mod cat; mod count; mod create_index; mod delete_index; mod expunge_deletes; mod get_document; mod get_mapping; mod get_settings; mod profile_query; mod put_mapping; mod refresh_index; mod suggest_term; mod update_settings; pub mod aggregate_sea...
the_stack
use bson::Bson; use mongodb::{Client, ThreadedClient}; use mongodb::db::ThreadedDatabase; use mongodb::coll::options::{FindOptions, FindOneAndUpdateOptions, IndexModel, IndexOptions, ReturnDocument}; #[test] fn find_sorted() { let client = Client::connect("localhost", 27017).unwrap();...
the_stack
#[cfg(doc)] use {crate::read::ZipFile, crate::write::FileOptions}; #[cfg(not(any( all(target_arch = "arm", target_pointer_width = "32"), target_arch = "mips", target_arch = "powerpc" )))] use std::sync::atomic; #[cfg(any( all(target_arch = "arm", target_pointer_width = "32"), target_arch = "mips",...
the_stack
use crate::firewall::varktables::helpers::{ add_chain_unique, append_unique, remove_if_rule_exists, }; use crate::firewall::varktables::types::TeardownPolicy::{Never, OnComplete}; use crate::network::internal_types::PortForwardConfig; use crate::network::types::Subnet; use ipnet::IpNet; use iptables::IPTables; use ...
the_stack
// Generic legend // M: Metric and Measure // Q: Metric and Measure Carrier/Distance // D: Domain // T: Domain Carrier // *I: Input // *O: Output // Ordering of generic arguments // DI, DO, MI, MO, TI, TO, QI, QO use std::rc::Rc; use crate::dom::PairDomain; use crate::error::*; use crate::traits::{DistanceConstant,...
the_stack
use geom::{Rect,Dims,Px}; use surface::{SurfaceView, Colour}; /// Decorator interface pub trait Decorator { fn set_title<S: Into<String>>(&mut self, title: S); fn render(&self, surface: SurfaceView, full_redraw: bool); fn client_rect(&self) -> (Dims<Px>,Dims<Px>); fn handle_event(&self, ev: ::InputEvent, win: &d...
the_stack
use std::sync::atomic::{AtomicU8, Ordering}; use std::sync::Weak; use std::task; use crate::rt::shared::RuntimeInternals; use crate::rt::{ptr_as_usize, ProcessId}; /// Maximum number of runtimes supported. pub(crate) const MAX_RUNTIMES: usize = 1 << MAX_RUNTIMES_BITS; #[cfg(not(any(test, feature = "test")))] pub(crat...
the_stack
use crate::*; use crate::geom::ScreenIntRect; use crate::pipeline::RasterPipelineBlitter; use crate::pixmap::SubPixmapMut; use crate::scalar::Scalar; use crate::scan; use crate::stroker::PathStroker; #[cfg(all(not(feature = "std"), feature = "libm"))] use crate::scalar::FloatExt; /// A path filling rule. #[derive(C...
the_stack
use std::cmp; use std::collections::hash_map::Iter; use std::collections::HashMap; use std::io::Error; use std::rc::Rc; use crate::rules::{bonus::AttackBuilder, BonusList, ItemKind, Slot}; use sulis_core::image::Image; use sulis_core::resource::ResourceSet; use sulis_core::util::unable_to_create_error; use crate::{ ...
the_stack
use std::net::Ipv6Addr; use nom; use nom::{le_u16, le_u32, le_u64, le_i32, le_i64, be_u16, IResult}; use sha2::{Sha256, Digest}; use message::Message; use message::{ AddrMessage, AuthenticatedBitcrustMessage, BlockMessage, GetdataMessage, GetblocksMessage, GetheadersMessage, HeaderMessage, InvMessage, SendCmp...
the_stack
#![allow(clippy::identity_op)] use std::collections::{hash_map, HashMap, HashSet}; use std::hash::{BuildHasherDefault, Hash, Hasher}; use std::path::PathBuf; use std::sync::Arc; use std::time::Instant; use nohash_hasher::NoHashHasher; use crate::bits; use crate::crypto; use crate::dbg_println; use crate::util::U128_...
the_stack
use std::collections::BTreeSet; use std::collections::HashMap; use crate::protocol::{Context, ContextInner, Contexts, Event, Span, SpanId, Timestamp}; use crate::types::Annotated; use crate::types::SpanAttribute; use crate::store::normalize::breakdowns::TimeWindowSpan; /// Merge a list of intervals into a list of no...
the_stack
use std::convert::{TryFrom, TryInto}; use chrono::{DateTime, NaiveDateTime, Utc}; use color_eyre::eyre::Result; use lazy_static::lazy_static; use crate::{ amount::Amount, block::{Block, Height, MAX_BLOCK_BYTES}, parameters::{Network, NetworkUpgrade}, serialization::{SerializationError, ZcashDeserializ...
the_stack
use std::{collections::HashMap, convert::TryInto}; use borsh::BorshSerialize; use mpl_metaplex::{ error::MetaplexError, id, instruction::{MetaplexInstruction, SetStoreIndexArgs}, state::{ AuctionCache, Key, Store, StoreIndexer, CACHE, INDEX, MAX_AUCTION_CACHE_SIZE, MAX_INDEXED_ELEMENTS,...
the_stack
use actix::prelude::*; use actix_web::web::{Data, Payload}; use actix_web::{web, App, Error, HttpRequest, HttpResponse, HttpServer}; use actix_web_actors::ws; use mediasoup::prelude::*; use mediasoup::worker::{WorkerLogLevel, WorkerLogTag}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::nu...
the_stack
use alumina_core::{ base_ops::{OpInstance, OpSpecification}, errors::{ExecutionError, GradientError, OpBuildError, ShapePropError}, exec::ExecutionContext, grad::GradientContext, graph::{Graph, Node, NodeID}, shape_prop::ShapePropContext, }; use indexmap::{indexset, IndexMap, IndexSet}; use ndarray::{Axis, Dimens...
the_stack
mutable_transmutes, non_camel_case_types, non_snake_case, non_upper_case_globals )] use crate::dpx_error::{Result, ERR}; use std::io::{Read, Seek, SeekFrom}; use crate::warn; use super::dpx_cmap::{CMap_cache_find, CMap_cache_get, CMap_set_usecmap}; use super::dpx_pst::{pst_get_token, PstObj}; use crate::...
the_stack
extern crate syntex_syntax as syntax; extern crate rustc_serialize; extern crate clap; extern crate walkdir; extern crate syncbox; extern crate num_cpus; #[cfg(test)] extern crate tempfile; mod visitor; use rustc_serialize::{json, Encodable, Encoder}; use clap::{App, Arg, SubCommand, AppSettings}; use syntax::pars...
the_stack
use std::sync::Arc; use casper_execution_engine::core::engine_state::executable_deploy_item::ExecutableDeployItem; use casper_types::{ bytesrepr::Bytes, runtime_args, system::standard_payment::ARG_AMOUNT, RuntimeArgs, SecretKey, U512, }; use derive_more::From; use itertools::Itertools; use crate::{ compon...
the_stack
use std::fs; use std::path::{Path, PathBuf}; use std::time::SystemTime; use anyhow::Context; use async_std::task; use fn_error_context::context; use crate::commands::{self, ExitCode}; use crate::connect::Connector; use crate::portable::control; use crate::portable::create; use crate::portable::exit_codes; use crate::...
the_stack
pub struct GetAccountAuthorizationDetailsPaginator< 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::get_account_authorization_details_input...
the_stack
use std::cmp; use std::collections::{HashMap, HashSet}; use std::io::{BufRead, BufReader, Write}; use std::net::{Shutdown, SocketAddr, TcpListener, TcpStream}; use std::sync::mpsc::{channel, sync_channel, Receiver, Sender, SyncSender, TrySendError}; use std::sync::{Arc, Mutex}; use std::{thread, time}; use bitcoin::Tx...
the_stack
extern crate winapi; extern crate kernel32; extern crate field_offset; use winapi::*; #[allow(unused_imports)] use self::field_offset::*; use std::mem; use std::ffi::CStr; use std::ptr::null_mut; use std::iter::once; use std::ffi::OsStr; use std::os::windows::ffi::OsStrExt; // Copied from winapi-rs since we are hav...
the_stack
//! Data structures and implementations for sending and receiving messages from peers. //! //! The public interface includes the structs [`PeerInterconnect`], [`PeerInterconnectBuilder`], //! [`NetworkMessageSender`], and [`ShutdownSignaler`]. //! //! [`NetworkMessageSender`]: struct.NetworkMessageSender.html //! [`Pee...
the_stack
use std::f64::EPSILON; use std::f64::consts::FRAC_1_SQRT_2; use nalgebra::{DVector, RowDVector, Vector2, MatrixMN, Dynamic, U2}; use wasm_bindgen::prelude::*; use crate::{FaceList, Face, set_panic_hook}; struct State { dims: usize, basis: MatrixMN<f64, U2, Dynamic>, offset: DVector<f64>, ext_prod: Vec...
the_stack
* which is in part based upon the Rustls implementation in bogo_shim.rs. * * ISC License (ISC) * Copyright (c) 2016, Joseph Birr-Pixton <jpixton@gmail.com> * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyr...
the_stack
use crate::{GroupId, TextSize}; #[cfg(target_pointer_width = "64")] use rome_rowan::static_assert; use rome_rowan::SyntaxTokenText; use std::borrow::Cow; use std::fmt::{self, Debug, Formatter}; use std::ops::Deref; type Content = Box<FormatElement>; /// Language agnostic IR for formatting source code. /// /// Use the...
the_stack
use crypto::{digest::Digest, sha2::Sha256}; use zksync_crypto::franklin_crypto::{ bellman::{ pairing::ff::{Field, PrimeField, PrimeFieldRepr}, Circuit, ConstraintSystem, SynthesisError, }, circuit::{boolean::Boolean, expression::Expression, num::AllocatedNum, sha256, Assignment}, rescue:...
the_stack
use crate::collections::HashMap; use std::borrow::Borrow; use std::cmp::Ordering; use std::hash::Hash; use std::iter::FromIterator; use std::ops::{BitAnd, BitOr, BitXor, Sub}; /// A hash set implementation based on `HashMap`. /// /// References: /// /// - [Rust Standard Library: std::collections::HashSet][1] /// /// [...
the_stack
use crate::{ auth::Authentication, body::AsyncBody, config::{request::RequestConfig, RedirectPolicy}, error::{Error, ErrorKind}, handler::RequestBody, interceptor::{Context, Interceptor, InterceptorFuture}, request::RequestExt, }; use http::{header::ToStrError, uri::Scheme, HeaderMap, Header...
the_stack
use std::cmp::Ordering::*; use std::fmt::Debug; use std::iter::{FromIterator, Cloned}; use std::ops::{Index, Range}; use std::slice::SliceIndex; use humansize::{file_size_opts, FileSize}; use rle::{AppendRle, HasLength, MergableSpan, MergeableIterator, MergeIter, SplitableSpan}; use rle::Searchable; use crate::localt...
the_stack
use std::fmt; use std::hash::{Hash, Hasher}; use std::sync::mpsc; use mint; #[cfg(feature = "audio")] use audio; use camera::Camera; use hub::{Hub, Message, Operation, SubLight, SubNode}; use light; use mesh::Mesh; use node::NodePointer; use scene::SyncGuard; use skeleton::{Bone, Skeleton}; use sprite::Sprite; use t...
the_stack
//! In-memory trie representation. use super::{ lookup::Lookup, node::{ decode_hash, Node as EncodedNode, NodeHandle as EncodedNodeHandle, NodeKey, Value as EncodedValue, }, CError, DBValue, Result, TrieError, TrieHash, TrieLayout, TrieMut, }; use hash_db::{HashDB, Hasher, Prefix, EMPTY_PREFIX}; use hashbrown...
the_stack
#[cfg(feature = "backend-combined-midly-0-5")] use crate::backend::combined::midly::midly_0_5::TrackEventKind; #[cfg(all(test, feature = "backend-combined-midly-0-5"))] use crate::backend::combined::midly::midly_0_5::{ num::{u4, u7}, MidiMessage, }; use core::num::NonZeroU64; use gcd::Gcd; use std::convert::{As...
the_stack
use std::fmt; use std::cmp::{Ordering,PartialEq,PartialOrd,Ord}; use super::*; use super::sq::SQ; // Castles have the src as the king bit and the dst as the rook const SRC_MASK: u16 = 0b0000_000000_111111; const DST_MASK: u16 = 0b0000_111111_000000; const FROM_TO_MASK: u16 = 0b0000_111111_111111; const PR_MAS...
the_stack
// immutable proxies to host objects use std::convert::TryInto; use crate::context::*; use crate::hashtypes::*; use crate::host::*; use crate::keys::*; // value proxy for immutable ScAddress in host container pub struct ScImmutableAddress { obj_id: i32, key_id: Key32, } impl ScImmutableAddress { pub fn ...
the_stack
use anyhow::Result; use magnitude::Magnitude; use num_traits::Zero; use std::any::Any; use std::collections::HashMap; use crate::algo::Error; use crate::graph::Edge; use crate::provide; /// Finds shortest path from all vertices to all the other ones using floyd-warshall algorithm. /// /// # Examples /// ``` /// use p...
the_stack