text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use std::fmt; #[derive(Clone)] pub struct MinMax<T> { pub min: T, pub max: T, } impl fmt::Display for MinMax<i32> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "[{},{}]", self.min, self.max) } } impl<T> MinMax<T> { fn new(min: T, max: T) -> MinMax<T> { MinMax { min, max } ...
the_stack
use crate::executor::{SlotExecutionInfo, SlotExecutor}; use crate::protocol::common::synod::{GCTrack, MultiSynod, MultiSynodMessage}; use fantoch::command::Command; use fantoch::config::Config; use fantoch::id::{Dot, ProcessId, ShardId}; use fantoch::protocol::{ Action, BaseProcess, MessageIndex, Protocol, Protocol...
the_stack
any(target_os = "macos", target_os = "ios"), link(name = "AVFoundation", kind = "framework") )] #![cfg_attr( any(target_os = "macos", target_os = "ios"), link(name = "CoreMedia", kind = "framework") )] #![allow(clippy::not_unsafe_ptr_arg_deref)] #[cfg(any(target_os = "macos", target_os = "ios"))] #[macro_u...
the_stack
use crate::{ analysis::{DominatorTree, PredecessorTable, TemporalRegionGraph}, ir::{ layout::BlockNode, prelude::*, BlockData, ControlFlowGraph, DataFlowGraph, ExtUnit, ExtUnitData, FunctionLayout, InstBuilder, InstData, UnitId, ValueData, }, table::TableKey, verifier::Verifier, ...
the_stack
use crate::matches; use crate::parse::{Node, NodeType}; use crate::util::roundup; use crate::{Ctype, Scope, TokenType, Type, Var}; use std::collections::HashMap; use std::mem; use std::sync::Mutex; // Quoted from 9cc // > Semantics analyzer. This pass plays a few important roles as shown // > below: // > // > - Add t...
the_stack
use std::collections::hash_map::Entry as HMEntry; use std::net::SocketAddr; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{mpsc, Arc, RwLock}; use std::time::Duration; use std::{io, thread}; use bincode; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use bytes::{BufMut, Bytes, BytesMut}; ...
the_stack
use anyhow::{bail, Result}; use proc_macro2::Span; use syn::parse::Error; use syn::spanned::Spanned; use syn::{ Attribute, DeriveInput, Field, Fields, Ident, Lit, Meta, MetaList, MetaNameValue, NestedMeta, Type, }; pub struct Template { pub source: TemplateSource, pub allow_template_child_without_attri...
the_stack
use crate::dynamics::solver::DeltaVel; use crate::dynamics::{ BallJoint, IntegrationParameters, JointGraphEdge, JointIndex, JointParams, RigidBodyIds, RigidBodyMassProps, RigidBodyPosition, RigidBodyVelocity, }; use crate::math::{AngVector, AngularInertia, Real, Rotation, SdpMatrix, Vector}; use crate::utils::{...
the_stack
use rayon::iter::{IndexedParallelIterator, IntoParallelIterator, ParallelIterator}; use std::fmt::{Debug, Error, Formatter}; use num_bigint::{BigUint, RandBigInt, ToBigInt}; use num_traits::{identities::Zero, One, Signed}; use crate::{gcd::mod_inverse, prelude::ByteBuffer, prime::sample_prime}; struct MinimalEncryp...
the_stack
use rand::seq::SliceRandom; use std::collections::HashMap; use std::mem; use std::rc::Rc; use chrono::NaiveDate; use gloo_storage::{errors::StorageError, LocalStorage, Storage}; use serde::{Deserialize, Serialize}; use web_sys::{window, Window}; pub type KnownStates = HashMap<(char, usize), CharacterState>; pub type ...
the_stack
use crate::check_args; use crate::commands; use crate::dict::dict_new; use crate::expr; use crate::list::list_to_string; use crate::molt_err; use crate::molt_ok; use crate::parser; use crate::parser::Script; use crate::parser::Word; use crate::scope::ScopeStack; use crate::types::*; use crate::value::Value; use std::an...
the_stack
use crate::platform::{self, abs, atan2, f32x4, sqrt}; use crate::{Glyph, OutlineBounds}; use alloc::vec; use alloc::vec::*; #[derive(Copy, Clone, PartialEq, Debug)] struct AABB { /// Coordinate of the left-most edge. xmin: f32, /// Coordinate of the right-most edge. xmax: f32, /// Coordinate of the...
the_stack
use crate::core::bits::Bits; use crate::core::exception::Exception; use crate::core::exception::ExceptionHandling; use crate::Processor; use Exception::Interrupt; /// /// Register API for NVIC /// pub trait NVIC { /// /// Write Interrupt Set Enable /// fn nvic_write_iser(&mut self, index: usize, value:...
the_stack
use crate::{ actor, actor_new, actor_of_trait, after, at, call, fwd, fwd_do, fwd_nop, fwd_panic, fwd_to, idle, lazy, ret, ret_do, ret_nop, ret_panic, ret_shutdown, ret_some_do, ret_some_to, ret_to, timer_max, timer_min, Actor, ActorOwn, Ret, Stakker, StopCause, CX, }; use std::cell::RefCell; use std::rc::Rc...
the_stack
pub mod character_selector; pub use self::character_selector::CharacterSelector; mod links_pane; use self::links_pane::LinksPane; pub mod module_selector; pub use self::module_selector::ModuleSelector; mod mods_selector; use self::mods_selector::ModsSelector; pub mod options; pub use self::options::Options; pub mo...
the_stack
use crate::error::{PostcssError, Result}; use crate::syntax::Lexer; use std::borrow::Cow; use std::iter::Peekable; use tokenizer::{Token, TokenType}; pub struct Root<'a> { pub children: Vec<RuleOrAtRuleOrDecl<'a>>, pub(crate) start: usize, pub(crate) end: usize, } pub enum RuleOrAtRuleOrDecl<'a> { Rule(Rule<'...
the_stack
use crate::{ config::CONFIG, documents::DOCUMENTS, jwt, pubsub::{self, subscribe, Subscriber}, rpc::{self, Error, Protocol, Request, Response}, utils::{ urls, uuids::{self, Family}, }, }; use defaults::Defaults; use eyre::{bail, Result}; use futures::{SinkExt, StreamExt}; use...
the_stack
use futures::channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender}; use futures::prelude::*; use futures::task::{Context, Poll}; use libp2p_core::connection::ConnectionId; use libp2p_core::{ConnectedPoint, Multiaddr, PeerId}; use libp2p_swarm::{ protocols_handler::ProtocolsHandler, DialPeerCondition, Netwo...
the_stack
use super::http_details_widget; use super::http_details_widget::HttpCommEntry; use crate::colors; use crate::http::tshark_http::HttpType; use crate::icons::Icon; use crate::message_parser; use crate::message_parser::{ ClientServerInfo, MessageData, MessageInfo, MessageParser, StreamData, StreamGlobals, }; use crate...
the_stack
use async_trait::async_trait; use futures::{future, future::LocalBoxFuture, stream, FutureExt, StreamExt, TryStreamExt}; use std::{ ffi::{OsStr, OsString}, fs, future::Future, io, path::{Path, PathBuf}, sync::Arc }; use walkdir::WalkDir; #[cfg(unix)] use std::os::unix::fs::FileExt; #[cfg(windows)] use std::os::window...
the_stack
pub mod client; pub mod db; pub mod graphql_duration; pub mod high_availability; pub mod sfa; pub mod snapshot; pub mod stratagem; pub mod task; pub mod warp_drive; use chrono::{DateTime, Utc}; use db::LogMessageRecord; use ipnetwork::{Ipv4Network, Ipv6Network}; use std::{ cmp::{Ord, Ordering}, collections::{B...
the_stack
use RegT; use bus::Bus; /// PIO channel A pub const PIO_A: usize = 0; /// PIO channel B pub const PIO_B: usize = 1; const NUM_CHANNELS: usize = 2; #[derive(Clone, Copy, PartialEq)] enum Expect { Any, IOSelect, IntMask, } #[derive(Clone, Copy, PartialEq)] pub enum Mode { Output, Input, Bidirec...
the_stack
#![allow(dead_code)] use openssl::crypto::symm; use serde_json; use hyper; pub mod mojang; use nbt; use format; use std::fmt; use std::default; use std::net::TcpStream; use std::io; use std::io::{Write, Read}; use std::convert; use byteorder::{BigEndian, WriteBytesExt, ReadBytesExt}; use flate2::read::{ZlibDecoder, ...
the_stack
use crate::TreeIter; use crate::TreeModelFlags; use crate::TreePath; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GtkTreeMo...
the_stack
fn main() { example::main(); } #[cfg(not(target_os = "linux"))] fn main() { println!("This example is currently not supported for OSes other than Linux"); } #[cfg(target_os = "linux")] mod example { use std::{process::Command, time::Instant}; use clipboard::{ClipboardContext, ClipboardProvider}; ...
the_stack
use mqtt_v5::topic::{Topic, TopicFilter, TopicLevel}; use std::collections::{hash_map::Entry, HashMap}; // TODO(bschwind) - Support shared subscriptions #[derive(Debug)] pub struct SubscriptionTreeNode<T> { subscribers: Vec<(u64, T)>, single_level_wildcards: Option<Box<SubscriptionTreeNode<T>>>, multi_lev...
the_stack
use crate::backend::TranslatedCodeSection; use crate::error::Error; use crate::microwasm; use crate::translate_sections; use cranelift_codegen::{ ir::{self, AbiParam, Signature as CraneliftSignature}, isa, }; use std::{convert::TryInto, mem}; use wasmparser::{FuncType, MemoryType, ModuleReader, SectionCode, Typ...
the_stack
use std::collections::{BTreeSet, VecDeque}; use crate::{ ast::{Exp, ExpData, LocalVarDecl, MemoryLabel, Operation, TempIndex, Value}, model::{GlobalEnv, ModuleId, NodeId, SpecVarId}, symbol::Symbol, ty::Type, }; use itertools::Itertools; /// Rewriter for expressions, allowing to substitute locals by e...
the_stack
//! The implementation for the `init` command. The `init` command for the `cargo //! wix` subcommand is focused on creating a WiX Source file (wxs) based on the //! contents of the Cargo manifest file (Cargo.toml) for the project and any //! run-time based settings. //! //! The `init` command should generally be called...
the_stack
use std::collections::{HashMap, HashSet}; use std::convert::TryInto; use nalgebra_glm as glm; use glm::{DVec3, DVec4, DMat4, U32Vec3}; use log::{info, warn, error}; #[cfg(feature = "rayon")] use rayon::prelude::*; use step::{ ap214, ap214::*, step_file::{FromEntity, StepFile}, id::Id, ap214::Entity, }; use crate...
the_stack
use crate::encode::encode_to_slice; use crate::{encode_config_slice, Config}; use std::{ cmp, fmt, io::{ErrorKind, Result, Write}, }; pub(crate) const BUF_SIZE: usize = 1024; /// The most bytes whose encoding will fit in `BUF_SIZE` const MAX_INPUT_LEN: usize = BUF_SIZE / 4 * 3; // 3 bytes of input = 4 bytes of...
the_stack
#![doc(html_root_url = "https://docs.rs/amadeus-postgres/0.4.3")] #![cfg_attr(nightly, feature(min_type_alias_impl_trait))] #![warn( // missing_copy_implementations, // missing_debug_implementations, // missing_docs, trivial_numeric_casts, unused_import_braces, unused_qualifications, unused_results, unreachable...
the_stack
use bigdecimal::{BigDecimal, ToPrimitive, Zero}; use data_manipulation_query_result::QueryExecutionError; use query_ast::{BinaryOperator, UnaryOperator}; use regex::Regex; use scalar::ScalarValue; use std::{ fmt::{self, Debug, Display, Formatter}, str::FromStr, }; use types::{Bool, SqlType, SqlTypeFamily}; #[d...
the_stack
//! Gas costs for common transactions. use crate::{ account::{Account, AccountData}, common_transactions::{create_account_txn, peer_to_peer_txn, rotate_key_txn}, executor::FakeExecutor, }; use aptos_crypto::{ed25519::Ed25519PrivateKey, PrivateKey, Uniform}; use aptos_types::transaction::{authenticator::Aut...
the_stack
#![cfg(not(feature = "compact"))] use lexical_parse_float::lemire; use lexical_parse_float::shared::INVALID_FP; fn compute_error32(q: i64, w: u64) -> (i32, u64) { let fp = lemire::compute_error::<f32>(q, w); (fp.exp, fp.mant) } fn compute_error64(q: i64, w: u64) -> (i32, u64) { let fp = lemire::compute_e...
the_stack
use { anyhow::format_err, fidl::endpoints::{ClientEnd, RequestStream}, fidl_fuchsia_hardware_audio::*, fidl_fuchsia_media, fuchsia_async as fasync, fuchsia_zircon::{self as zx, DurationNum}, futures::{ select, stream::{FusedStream, Stream}, task::{Context, Poll}, ...
the_stack
use { crate::{ ap::{frame_writer, BufferedFrame, Context, TimedEvent}, buffer::{InBuf, OutBuf}, ddk_converter, device::TxFlags, disconnect::LocallyInitiated, error::Error, timer::EventId, }, banjo_ddk_hw_wlan_ieee80211::*, banjo_fuchsia_hardware_wl...
the_stack
//! Generates trie root. //! //! This module should be used to generate trie root hash. #![cfg_attr(not(feature = "std"), no_std)] #[cfg(not(feature = "std"))] extern crate alloc; #[cfg(feature = "std")] mod rstd { pub use std::{ cmp, collections::{BTreeMap, VecDeque}, vec::Vec, }; } #[cfg(not(feature = "st...
the_stack
//! A compressed in-memory representation of a vector path. use crate::clip::{self, ContourPolygonClipper}; use crate::dilation::ContourDilator; use crate::orientation::Orientation; use crate::segment::{Segment, SegmentFlags, SegmentKind}; use crate::util::safe_sqrt; use pathfinder_geometry::line_segment::LineSegment2...
the_stack
cfg_if::cfg_if! { if #[cfg(nasm_x86_64)] { pub use crate::asm::x86::transform::inverse::*; } else if #[cfg(asm_neon)] { pub use crate::asm::aarch64::transform::inverse::*; } else { pub use self::rust::*; } } use crate::tiling::PlaneRegionMut; use crate::util::*; // TODO: move 1d txfm code to rust ...
the_stack
use etherparse::*; use super::*; #[test] fn eth_ipv4_udp() { //generate let in_payload = [24,25,26,27]; let mut serialized = Vec::new(); PacketBuilder::ethernet2([1,2,3,4,5,6],[7,8,9,10,11,12]) .ipv4([13,14,15,16], [17,18,19,20], 21) .udp(22,23) .wr...
the_stack
use sgx_trts::libc::c_int; use core::fmt; use crate::io::{self, Error, ErrorKind}; use crate::net::{Ipv4Addr, Ipv6Addr, SocketAddr, ToSocketAddrs}; use crate::sys_common::net as net_imp; use crate::sys_common::{AsInner, FromInner, IntoInner}; use crate::time::Duration; /// A UDP socket. /// /// After creating a `UdpSo...
the_stack
mod assignment; mod left_hand_side; mod primary; #[cfg(test)] mod tests; mod unary; mod update; pub(in crate::syntax::parser) mod await_expr; use self::assignment::ExponentiationExpression; pub(super) use self::{assignment::AssignmentExpression, primary::Initializer}; use super::{AllowAwait, AllowIn, AllowYield, Curs...
the_stack
use crate::error::Error; use crate::resolve_import::resolve_import; use deno_ast::swc::ast::Program; use deno_ast::swc::common::chain; use deno_ast::swc::common::comments::SingleThreadedComments; use deno_ast::swc::common::errors::Diagnostic; use deno_ast::swc::common::errors::DiagnosticBuilder; use deno_ast::swc::comm...
the_stack
//! Key occurrences in a lifecycle of [Cucumber] execution. //! //! The top-level enum here is [`Cucumber`]. //! //! Each event enum contains variants indicating what stage of execution //! [`Runner`] is at, and variants with detailed content about the precise //! sub-event. //! //! [`Runner`]: crate::Runner //! [Cucum...
the_stack
#[cfg(any( all(test, feature = "check_contracts_in_tests"), feature = "check_contracts" ))] use contracts::*; #[cfg(not(any( all(test, feature = "check_contracts_in_tests"), feature = "check_contracts" )))] use disabled_contracts::*; use std::mem::MaybeUninit; #[cfg(any( all(test, feature = "check...
the_stack
use std::panic::Location; use serde::de::Deserialize; use crate::{Profile, Provider, Metadata}; use crate::error::{Kind, Result}; use crate::value::{Value, Map, Dict, Tag, ConfiguredValueDe}; use crate::coalesce::{Coalescible, Order}; /// Combiner of [`Provider`]s for configuration value extraction. /// /// # Overvi...
the_stack
use dates::datetime::DateDayFraction; use dates::calendar::RcCalendar; use dates::Date; use data::volsmile::VolSmile; use data::volsmile::FlatSmile; use data::volsmile::CubicSplineSmile; use data::forward::Forward; use data::voldecorators::ConstantExpiryTimeEvolution; use data::voldecorators::RollingExpiryTimeEvolution...
the_stack
#![feature(portable_simd, platform_intrinsics)] use std::simd::*; fn simd_ops_f32() { let a = f32x4::splat(10.0); let b = f32x4::from_array([1.0, 2.0, 3.0, -4.0]); assert_eq!(-b, f32x4::from_array([-1.0, -2.0, -3.0, 4.0])); assert_eq!(a + b, f32x4::from_array([11.0, 12.0, 13.0, 6.0])); assert_eq!(a...
the_stack
use crate::prelude::*; use std::{fmt::Debug, mem, pin::Pin, sync::Arc}; /* ========================================================================= */ /// A event payload in form of two borrowed Value's with a vector of source binaries. /// /// We have a vector to hold multiple raw input values /// - Each input va...
the_stack
use byteorder::{ByteOrder, LittleEndian}; use ckb_chain_spec::consensus::Consensus; use ckb_dao_utils::{extract_dao_data, pack_dao_data, DaoError}; use ckb_traits::{CellDataProvider, EpochProvider, HeaderProvider}; use ckb_types::{ bytes::Bytes, core::{ cell::{CellMeta, ResolvedTransaction}, Cap...
the_stack
//! Near-zero-cost, mostly-safe idiomatic bindings to LMDB. //! //! This crate provides an interface to LMDB which as much as possible is not //! abstracted from the model LMDB itself provides, except as necessary to //! integrate with the borrow checker. This means that you don't get easy //! iterators, but also that ...
the_stack
use std::fmt; use proc_macro2::TokenStream; use quote::{quote, quote_spanned}; use syn::{parse::Parse, spanned::Spanned}; use crate::helpers::*; bitflags::bitflags! { pub struct BuilderMethods: u16 { const DEFAULT = 0b000_0000_0001; const TRANSFORM = 0b000_0000_0010; const VAL...
the_stack
use byteorder::{LittleEndian, ReadBytesExt}; use super::*; #[derive(Debug, Serialize)] struct FMaterialParameterInfo { name: String, association: u8, index: i32, } impl NewableWithNameMap for FMaterialParameterInfo { fn new_n(reader: &mut ReaderCursor, name_map: &NameMap, _import_map: &ImportMap) -> P...
the_stack
use std::cmp; use std::ptr; #[cfg(all(feature = "alloc", not(feature = "std")))] use alloc::vec::Vec; use super::Const; use crate::base::allocator::{Allocator, Reallocator}; use crate::base::array_storage::ArrayStorage; #[cfg(any(feature = "alloc", feature = "std"))] use crate::base::dimension::Dynamic; use crate::ba...
the_stack
use std::sync::atomic::{self, AtomicPtr}; use std::marker::PhantomData; use std::ptr; use {Guard, add_garbage_box}; /// A Treiber stack. /// /// Treiber stacks are one way to implement concurrent LIFO stack. /// /// Treiber stacks builds on linked lists. They are lock-free and non-blocking. It can be compared /// to t...
the_stack
use serde::{Deserialize, Serialize}; use std::cmp::{Ord, Ordering, PartialOrd}; use std::collections::hash_map::Values; use std::collections::{HashMap, HashSet}; use std::path::PathBuf; use crate::environment::Environment; use crate::plugins::{get_plugin_dir, BinaryEnvironment}; use crate::types::{BinaryName, CommandN...
the_stack
#![allow(clippy::needless_return)] #[macro_use] mod load; use load::{load_data, DataType}; use rmi_lib::{train, train_bounded}; use rmi_lib::KeyType; use rmi_lib::optimizer; use json::*; use log::*; use std::f64; use std::fs::File; use std::io::BufWriter; use std::fs; use std::path::Path; use rayon::prelude::*; use...
the_stack
use std::ops::{Add, Mul}; use conv::{ NoError, ValueFrom, }; use conv::errors::UnwrapOk; use types::{Buffer, Input}; use combinators::{matched_by, option, or}; use parsers::{SimpleResult, Error, satisfy, skip_while, skip_while1, take_while1, token}; /// Lowercase ASCII predicate. #[inline] pub fn is_lowercas...
the_stack
use crate::js::exports::Exportable; use crate::js::externals::Extern; use crate::js::imports::Imports; use crate::js::store::Store; use crate::js::types::{ExportType, ImportType}; // use crate::js::InstantiationError; #[cfg(feature = "wat")] use crate::js::error::WasmError; use crate::js::error::{CompileError, Deserial...
the_stack
use crate::{ arch::{loff_t, off64_t, Architecture, NativeArch}, arch_structs::{ self, __sysctl_args, accept4_args, accept_args, cmsg_align, cmsghdr, connect_args, getsockname_args, getsockopt_args, ifconf, ifreq, iovec, ipc_kludge_args, iw_point, iwreq, kernel_sigaction, mmap_args, mmsgh...
the_stack
//! Segment of a PMMR. use crate::core::hash::Hash; use crate::core::pmmr::{self, Backend, ReadablePMMR, ReadonlyPMMR}; use crate::ser::{Error, PMMRIndexHashable, PMMRable, Readable, Reader, Writeable, Writer}; use croaring::Bitmap; use std::cmp::min; use std::fmt::{self, Debug}; #[derive(Clone, Debug, PartialEq, Eq)...
the_stack
use aster::AstBuilder; use data_structures::indexed_vec::Idx; use mir::{self, BasicBlock, Local, LocalDecl, Mir, VisibilityScope}; use std::collections::{BTreeMap, HashMap, HashSet}; use std::mem; use super::builder::Builder; use syntax::ast; use syntax::codemap::Span; use syntax::ext::base::ExtCtxt; /// `LocalStack` ...
the_stack
//! Database backend support for the AdminServiceStore, powered by //! [`Diesel`](https://crates.io/crates/diesel). //! //! This module contains the [`DieselAdminServiceStore`], which provides an implementation of the //! [`AdminServiceStore`] trait. //! //! [`DieselAdminServiceStore`]: struct.DieselAdminServiceStore.h...
the_stack
use std::convert::TryFrom; use std::ffi::OsString; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::{env, fs}; use anyhow::*; use embuild::cmake::file_api::codemodel::Language; use embuild::cmake::file_api::ObjKind; use embuild::espidf::InstallOpts; use embuild::fs::copy_file_if_different; use embuild::...
the_stack
use crate::ast::ExprKind::*; use crate::ast::*; use crate::util::join; /// The number of spaces used when indenting code. const INDENT_LEVEL: i32 = 2; /// A trait for pretty printing expression trees. pub trait PrettyPrint { /// Pretty print an expression. /// /// The pretty printed expression contains n...
the_stack
use voile_util::meta::{MetaSolution, MI}; use voile_util::tags::VarRec; use crate::syntax::core::{CaseSplit, Closure, Neutral, TraverseNeutral, Val, Variants}; use super::monad::{TCE, TCM, TCS}; use std::cmp::Ordering; fn check_solution(meta: MI, rhs: Val) -> TCM<()> { rhs.try_fold_neutral((), |(), neut| match n...
the_stack
use super::super::machine::register::{PhysReg, RegisterClassKind}; use crate::codegen::{ arch::machine::abi::SystemV, common::machine::calling_conv::ArgumentRegisterOrder, }; use crate::{ codegen::{ common::machine::{basic_block::*, const_data::*, function::*, module::*}, internal_function_names...
the_stack
mod node; mod nodecache; use chrono::{DateTime, Utc}; use fuse; use log::*; use std::collections::hash_map::DefaultHasher; use std::collections::HashMap; use std::ffi; use std::hash::{Hash, Hasher}; use std::io::{self, Read, Seek}; use std::os; use std::os::unix::ffi::OsStrExt; pub use self::node::*; pub use self::no...
the_stack
use super::convert_event; use crate::image_util; use crate::widget::attribute::util::{get_id, get_key, get_layout}; use crate::widget::event::KeyCode; use crate::{widget::attribute::find_value, AttribKey, Widget}; use sauron::{ html::{attributes::*, div, img, input, text}, prelude::*, }; use std::fmt::Debug; /...
the_stack
use crate::chunk::Files; use crate::grep::GrepMatch; use crate::printer::Printer; use anyhow::{Context, Result}; use grep_matcher::{LineTerminator, Matcher}; use grep_pcre2::{RegexMatcher as Pcre2Matcher, RegexMatcherBuilder as Pcre2MatcherBuilder}; use grep_regex::{RegexMatcher, RegexMatcherBuilder}; use grep_searcher...
the_stack
extern crate chrono; extern crate time; use ::{JsResult, JsError}; use rt::{JsEnv, JsArgs, JsValue, JsFnMode, JsPreferredType, JsType, JsString, JsItem, JsHandle}; use syntax::token::name; use gc::AsPtr; use std::f64; use self::chrono::*; use std::fmt::Write; struct TimeZoneInfo { offset: i32, dst: bool } im...
the_stack
use crate::database::*; use crate::fasmparse::*; use crate::bels::*; use multimap::MultiMap; use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::io::Write; use log::*; // 2D bit array #[derive(Clone)] pub struct BitMatrix { pub frames: usize, pub bits: usize, data: Vec<bool>, } impl BitMatrix {...
the_stack
use crate::bank::BankBox; use crate::error::ProtocolError; use crate::input_boxes::*; use crate::parameters::{UPDATE_BALLOT_TOKEN_ID, UPDATE_NFT_ID}; use crate::protocol::StableCoinProtocol; use ergo_headless_dapp_framework::encoding::{ hash_and_serialize_p2s, serialize_hex_encoded_string, serialize_p2s_from_ergo_t...
the_stack
use std::sync::atomic::{AtomicUsize, Ordering}; use std::mem::size_of; use std::{cmp, ptr}; /// Enumeration of errors possible in this library #[derive(thiserror::Error, Debug)] pub enum Error { #[error("Buffer too small")] BufTooSmall, #[error("Buffer too big")] BufTooBig, #[error("Buffer unaligne...
the_stack
use crate::hid::packet::Packet; use anyhow::Error; use async_trait::async_trait; use bytes::Bytes; use std::fmt::Debug; #[cfg(test)] pub use self::fake::FakeConnection; pub use self::fidl::FidlConnection; /// A basic connection to a HID device. #[async_trait(?Send)] pub trait Connection: Sized + Debug { /// Recei...
the_stack
use std::fmt; use std::iter; use std::iter::FromIterator; use std::mem; use std::ptr; use std::collections::BTreeMap; use vec_map::VecMap; use super::{Queue, Stack}; pub use self::Node::*; fn min<T: PartialOrd + Copy>(x: T, y: T) -> T { if x >= y { y } else { x } } #[derive(Debug)] pub...
the_stack
use cosmwasm_bignumber::{Decimal256, Uint256}; use cosmwasm_std::{ attr, to_binary, Addr, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, StdResult, SubMsg, WasmMsg, }; use crate::error::ContractError; use crate::querier::{query_borrower_info, query_liquidation_amount}; use crate::state::{ read_all_c...
the_stack
use pulldown_cmark::{Alignment, Event, Options, Parser, Tag}; use crate::{Frame, Rect, Point, Align, WidthRelative, Color}; impl Frame { /** A text area widget that parses markdown text. Child themes need to be defined for each font / size combination that you want to be able to render. This norm...
the_stack
use std::collections::HashMap; use crate::{ core::{date::IsInMonth, renderer::DrawEnvironment}, style::{date_picker::Style, style_state::StyleState}, }; use crate::{native::overlay::date_picker::Focus, style::date_picker::StyleSheet}; use chrono::{self, Datelike}; use iced_graphics::{ backend, Backend, Co...
the_stack
use std::collections::HashMap; use super::*; // #[test] // fn test_global_properties() { // let c = Context::new().unwrap(); // assert_eq!( // c.global_property("lala"), // Err(ExecutionError::Exception( // "Global object does not have property 'lala'".into() // )) // ...
the_stack
use std::time; use std::collections::HashMap; use redis::aio::Connection; use ocypod::application::RedisManager; use ocypod::models::{queue, job, ServerInfo, Duration, OcyError}; use crate::support::*; mod support; const DEFAULT_QUEUE: &str = "default"; /// Starts a new `redis-server`, and opens a connection to it. ...
the_stack
use crate::errors::*; use crate::{Counter, Histogram}; use std::borrow::Borrow; use std::borrow::BorrowMut; use std::marker::PhantomData; use std::ops::{AddAssign, Deref, DerefMut}; use std::sync::{atomic, Arc, Mutex}; use std::time; /// A write-only handle to a [`SyncHistogram`]. /// /// This handle allows you to rec...
the_stack
use { crate::ie::*, paste, std::{ cmp::{max, min}, collections::HashSet, ops::BitAnd, }, zerocopy::LayoutVerified, }; // TODO(fxbug.dev/42763): HT and VHT intersections defined here are best effort only. // For example: // struct Foo { a: u8, b: u8 }; // impl_intersect!(Foo...
the_stack
use crate::contract::{execute, instantiate, query}; use crate::testing::mock_querier::mock_dependencies; use cosmwasm_bignumber::{Decimal256, Uint256}; use cosmwasm_std::testing::{mock_env, mock_info}; use cosmwasm_std::{from_binary, to_binary, BankMsg, Coin, CosmosMsg, Decimal, SubMsg, Uint128}; use cw20::Cw20ReceiveM...
the_stack
// bindgen /usr/include/linux/if_tun.h --no-layout-tests /* automatically generated by rust-bindgen 0.58.1 */ #[repr(C)] #[derive(Default)] pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]); impl<T> __IncompleteArrayField<T> { #[inline] pub const fn new() -> Self { __Incomple...
the_stack
use unic_char_property::TotalCharProperty; char_property! { /// Represents the Unicode Character /// [`General_Category`](http://unicode.org/reports/tr44/#General_Category) property. /// /// This is a useful breakdown into various character types which can be used as a default /// categorization in...
the_stack
use std::collections::HashMap; use std::io::{Error, ErrorKind}; use std::sync::Arc; use bincode::{deserialize, serialize}; use grpcio::{ChannelBuilder, EnvBuilder}; use log::*; use raft::eraftpb::{ConfChange, ConfChangeType}; use bayard_proto::proto::commonpb::State; use bayard_proto::proto::raftpb_grpc::RaftServiceC...
the_stack
extern crate binjs_meta; extern crate clap; extern crate env_logger; extern crate itertools; #[macro_use] extern crate log; extern crate webidl; extern crate yaml_rust; use binjs_meta::export::{ ToWebidl, TypeDeanonymizer, TypeName }; use binjs_meta::import::Importer; use binjs_meta::spec::*; use binjs_meta::util:: { ...
the_stack
use std::{ char, os::raw::c_int, ptr, sync::atomic::{AtomicBool, AtomicPtr, Ordering}, }; use crate::event::{ModifiersState, ScanCode, VirtualKeyCode}; use windows::Win32::{ Foundation::{HWND, LPARAM, WPARAM}, UI::{ Input::KeyboardAndMouse::*, TextServices::HKL, WindowsAndMessaging::{self as w...
the_stack
use pathfinder_geometry::transform2d::{Matrix2x2F, Transform2F}; use pathfinder_geometry::vector::Vector2F; use crate::error::ParseError; use crate::outline::{OutlineBuilder, OutlineSink}; use crate::tables::glyf::{CompositeGlyph, CompositeGlyphScale, GlyfTable, GlyphData, SimpleGlyph}; use contour::{Contour, CurvePo...
the_stack
//! The `gdt` module provides abstractions for building a Global Descriptor Table (GDT). //! //! These abstractions are built to resemble the structures defined in the //! [Intel Manual](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.p...
the_stack
use shared::*; use spirv_std::glam::{ const_mat2, const_vec3, vec2, vec3, vec4, Mat2, Vec2, Vec2Swizzles, Vec3, Vec3Swizzles, Vec4, Vec4Swizzles, }; // Note: This cfg is incorrect on its surface, it really should be "are we compiling with std", but // we tie #[no_std] above to the same condition, so it's fine....
the_stack
use crate::dh_installsystemd; use crate::dh_lib; use crate::error::*; use crate::listener::Listener; use crate::manifest::Config; use crate::pathbytes::*; use crate::tararchive::Archive; use crate::util::{is_path_file, read_file_to_bytes}; use crate::wordsplit::WordSplit; use dh_lib::ScriptFragments; use md5::Digest; u...
the_stack
use app::constants::*; use backend::obj::*; use backend::world::agent; use backend::world::agent::Agent; use backend::world::agent::Brain; use backend::world::agent::TypedBrain; use backend::world::agent::N_WEIGHTS; use backend::world::gen::*; use backend::world::segment; use backend::world::segment::*; use cgmath; use...
the_stack
use crate::build_rs::BuildInfo; use crate::gen::common::{ProbeGeneratorBase, ProviderTraitGeneratorBase}; use crate::spec::ProbeSpecification; use crate::spec::ProviderSpecification; use crate::syn_helpers; use crate::TracersResult; use heck::ShoutySnakeCase; use proc_macro2::TokenStream; use quote::{quote, quote_spann...
the_stack
/// Returns an `HList` based on the values passed in. /// /// Helps to avoid having to write nested `HCons`. /// /// # Examples /// /// ``` /// # #[macro_use] extern crate frunk; fn main() { /// let h = hlist![13.5f32, "hello", Some(41)]; /// let (h1, (h2, h3)) = h.into_tuple2(); /// assert_eq!(h1, 13.5f32); /// assert...
the_stack
use std::cmp::max; use std::i32; use std::iter::repeat; // Types for representing pairwise sequence alignments pub type TextSlice<'a> = &'a [u64]; /// Alignment operations supported are match, substitution, insertion, deletion /// and clipping. Clipping is a special boundary condition where you are allowed /// to cl...
the_stack
//! Implementation of the sandboxfs FUSE file system. // Keep these in sync with the list of checks in main.rs. #![warn(bad_style, missing_docs)] #![warn(unused, unused_extern_crates, unused_import_braces, unused_qualifications)] #![warn(unsafe_code)] // We construct complex structures in multiple places, and allowin...
the_stack
#[cfg(any(target_arch = "x86_64", target_arch = "x86"))] mod v_integer; static DIGITS_LUT: &[u8] = b"\ 0001020304050607080910111213141516171819\ 2021222324252627282930313233343536373839\ 4041424344454647484950515253545556575859\ 6061626364656667686970717273747576777879\ 808182838485868788...
the_stack