text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use std::collections::BTreeMap; use std::ffi::CStr; use std::fs::File; use std::mem::ManuallyDrop; use std::os::raw::c_char; use std::path::PathBuf; use std::sync::atomic::AtomicU64; use std::sync::Arc; use tracing::instrument; use umash::Fingerprint; use uuid::Uuid; use crate::chain_error; use crate::chain_warn; use ...
the_stack
use std::collections::HashMap; #[derive(Debug, Clone)] pub struct Symbol { pub name: String, pub len: usize, pub token: Token, pub group: Group, } #[derive(Debug, PartialEq, Clone)] pub enum Group { DataType, Function, Keyword, Operator, // >, >=, =, !=, <>, <, <= Identifier, // ...
the_stack
use expr_builder::ExprBuilder; use parity_wasm::elements::{BlockType, Opcode, Type, TypeSection}; use reorder_analysis::can_local_be_reordered; use std::collections::BTreeMap; use std::io::Write; use {call_indirect_name, precedence, to_rs_type, BlockKind, Function, Global, Indentation}; fn is_breakable_if(remaining_op...
the_stack
use serde_json; use std::intrinsics::unlikely; use std::slice::{Iter, IterMut}; use std::fmt::{self, Formatter, Debug}; use std::collections::hash_map; use futures::{Future, Sink}; use super::*; use superlog::CacheAction; /// Returns a struct given the struct's field:value pairs in a `HashMap`. If the provided `Ha...
the_stack
use crate::datatypes::{NatsClient, NatsServer, Publication, SubjectTreeNode}; use rusqlite::{params, Connection, Error, Result}; use serde_json; pub fn get_db_conn() -> rusqlite::Result<Connection> { let path = "./sqlite.db"; Connection::open(&path) } pub fn db_conn() -> Connection { get_db_conn().expect(...
the_stack
use std::env; use std::io::{stdout, stderr, Write}; use std::path::{Path, PathBuf}; use std::fs::metadata; use std::os::unix::fs::MetadataExt; use libc::getuid; use argparse::{ArgumentParser, Store, List, Collect, Print, StoreFalse, StoreTrue}; use options::build_mode::{build_mode, BuildMode}; use config::{Config, Co...
the_stack
use std::{ collections::{BTreeMap, HashMap, HashSet}, net::SocketAddr, }; use serde::{Deserialize, Serialize}; use crypto::hash::{BlockHash, CryptoboxPublicKeyHash, HashBase58, OperationHash}; use tezos_api::ffi::{Applied, Errored, PrevalidatorWrapper}; use tezos_messages::p2p::encoding::{block_header::BlockH...
the_stack
use regex::Regex; use std::ops::Range; use crate::flatjson::{FlatJson, Index}; #[derive(PartialEq, Eq, Debug, Copy, Clone)] pub enum SearchDirection { Forward, Reverse, } impl SearchDirection { pub fn prompt_char(&self) -> char { match self { SearchDirection::Forward => '/', ...
the_stack
use std::io; use std::iter; use std::path::Path; use csv; use memmap::Mmap; use crate::error::{Error, Result}; use crate::index::{csv_file, csv_mmap, id}; use crate::record::AKA; use crate::util::IMDB_AKAS; /// A name of the AKA record index file. /// /// This index represents a map from IMDb title id to a 64-bit in...
the_stack
use regex::Regex; use crate::libs; use crate::types::Tokens; use crate::types::Redirection; use crate::tools; pub fn line_to_plain_tokens(line: &str) -> Vec<String> { let mut result = Vec::new(); let v = cmd_to_tokens(line); for (_, r) in v { result.push(r); } result } pub fn tokens_to_ar...
the_stack
use std::{ cmp::{min, Ordering}, fmt::Debug, mem, }; use automerge_protocol::OpId; pub type SequenceTree<T> = SequenceTreeInternal<T, 25>; #[derive(Clone, Debug)] pub struct SequenceTreeInternal<T, const B: usize> { root_node: Option<SequenceTreeNode<T, B>>, } #[derive(Clone, Debug, PartialEq)] stru...
the_stack
use super::*; use crate::common::test_utils::mockall_csp::MockAllCryptoServiceProvider; use crate::sign::tests::{ dealing_encryption_pk_record_with, registry_with_records, REG_V1, REG_V2, }; use crate::sign::threshold_sig::ni_dkg::test_utils::csp_fs_enc_pk; use crate::sign::threshold_sig::ni_dkg::test_utils::dealin...
the_stack
use crate::app::{ self, column_view::{self, ColumnView}, field_view::FieldView, page_view::{self, PageView}, row_view::RowView, }; use data_table::DataColumn; use diwata_intel::{data_container::Page, Dao, Field, Tab, TableName}; use sauron::{ html::{attributes::*, events::*, units::*, *}, Co...
the_stack
use crate::config::{PeerRole, RoleType}; use aptos_types::PeerId; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use short_hex_str::AsShortHexStr; use std::{fmt, str::FromStr}; /// A grouping of common information between all networking code for logging. /// This should greatly reduce the groupings bet...
the_stack
use super::binding_context::*; use super::releasable::*; use super::traits::*; use std::mem; use std::sync::*; /// /// Represents a computed value /// #[derive(Clone)] enum ComputedValue<Value: 'static + Clone> { Unknown, Cached(Value), } use self::ComputedValue::*; /// /// Core representation ofa computed ...
the_stack
pub(crate) use base::SharedMemoryUnix as SharedMemorySys; use std::fs::File; use std::os::unix::io::AsRawFd; use std::os::unix::net::UnixListener; use std::path::Path; use std::sync::Arc; use crate::vfio::{VfioDevice, VfioRegionAddr}; use crate::virtio::interrupt::SignalableInterrupt; use crate::virtio::vhost::user::...
the_stack
use std::borrow::Cow; use std::default::Default; use std::fs; use std::ops::Deref; mod dwarf; use fnv::FnvHashMap as HashMap; use gimli; use memmap; use object::{self, Object, ObjectSection, ObjectSegment, ObjectSymbol, ObjectSymbolTable}; use typed_arena::Arena; use crate::cfi::Cfi; use crate::function::{Function, ...
the_stack
extern crate extra; use std::fs; use std::io::{self, Write}; use std::path::Path; use std::process::exit; use std::os::unix::fs::{FileTypeExt, MetadataExt, PermissionsExt}; use extra::option::OptionalExt; const MAN_PAGE: &'static str = /* @MANSTART{test} */ r#" NAME test - perform tests on files and text SYNOPSI...
the_stack
use crate::full_inference::analysis::AnalysisIr; use crate::full_inference::analysis::Node; use crate::full_inference::analysis::Path; use crate::full_inference::analysis::PathData; use crate::full_inference::constraint::Constraint; use crate::full_inference::constraint::ConstraintAt; use crate::full_inference::FullInf...
the_stack
use proc_macro2::TokenStream as TokenStream2; use quote::{ToTokens, quote_spanned}; use as_derive_utils::{ gen_params_in::InWhat, }; use crate::{ sabi_trait::{ WhichSelf, WithAssocTys, TokenizerParams, }, }; /// Generates the code that delegates the implementation of the traits ...
the_stack
use std::env; use std::ffi::{CString, OsStr, OsString}; use std::fs::File; use std::io::{Error, Result}; use std::iter; use std::marker::PhantomData; use std::mem; use std::os::unix::ffi::OsStrExt; use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::ptr; use std::rc::Rc; use std::time::{Duration, Instant}; us...
the_stack
use super::shader::{ShaderDirectory, SHADER_ENTRY_POINT_NAME}; use std::path::{Path, PathBuf}; use std::rc::{Rc, Weak}; pub type ComputePipelineHandle = Rc<usize>; pub type RenderPipelineHandle = Rc<usize>; // This is essentially a copy of wgpu::ComputePipelineDescriptor that we can store. // This is needed since we ...
the_stack
mod contract; mod ethereum; pub(crate) mod merkle_tree; mod schema; mod state; use std::path::{Path, PathBuf}; #[cfg(test)] use std::sync::Mutex; pub use contract::{ContractCodeTable, ContractsTable}; pub use ethereum::{EthereumBlocksTable, EthereumTransactionsTable}; pub use state::{ ContractsStateTable, EventFi...
the_stack
use std::ops::Range; use chrono::{DateTime, FixedOffset, NaiveDateTime, NaiveTime, ParseError, TimeZone, Utc}; use regex::Regex; type DateParsingFun = dyn Fn(&str) -> Result<DateTime<FixedOffset>, ParseError>; // Those are some date formats that are common for my personal (and biased) // experience. So, there is lo...
the_stack
use super::*; const EULERS_CONSTANT: f32 = 5.772156649015328606065120900824024310e-01; impl<S: Simd> SimdVectorizedSpecialFunctionsInternal<S> for f32 where <S as Simd>::Vf32: SimdFloatVector<S, Element = f32>, { #[inline(always)] fn tgamma<P: Policy>(mut z: Self::Vf) -> Self::Vf { let zero = Vf32...
the_stack
use crate::process::traversal::traverser::Traverser; use std::marker::PhantomData; #[enum_dispatch] pub trait Predicate<T> { fn test(&self, entry: &T) -> Option<bool>; } impl<T, F: Fn(&T) -> Option<bool>> Predicate<T> for F { fn test(&self, entry: &T) -> Option<bool> { (self)(entry) } } impl<T> P...
the_stack
//! Compilation of regexes to VM. use std::usize; use regex; use Expr; use Result; use Error; use LookAround; use LookAround::*; use analyze::Info; use vm::{Insn,Prog}; // I'm thinking it probably doesn't make a lot of sense having this split // out from Compiler. struct VMBuilder { prog: Vec<Insn>, n_saves:...
the_stack
use std::fmt; use std::fmt::Write; use regex::Regex; use crate::flatjson::{FlatJson, OptionIndex, Row, Value}; use crate::truncate::TruncationResult::{DoesntFit, NoTruncation, Truncated}; use crate::truncate::{min_required_columns_for_str, truncate_right_to_fit}; use crate::tuicontrol::{Color, TUIControl}; use crate:...
the_stack
use std::collections::BinaryHeap; use std::collections::HashMap; use std::cmp::Ordering; #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct Position { pub x: usize, pub y: usize } // Used to maintain a priority queue of positions to explore. #[derive(Copy, Clone, Eq, PartialEq, Debug)] struct Posit...
the_stack
use crate::metric::TagMap; use clap::{App, Arg}; use std::collections::HashMap; use std::env; use std::fs::File; use std::io::Read; use std::path::{Path, PathBuf}; use toml; const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION"); use crate::filter::{ DelayFilterConfig, FlushBoundaryFilterConfig, J...
the_stack
#![warn(missing_docs)] #[macro_use] extern crate serde; #[macro_use] extern crate lazy_static; use minigene::*; use std::collections::hash_map::RandomState; use std::collections::HashMap; use uuid::*; use nakama_rs::api_client::{ApiClient, Event}; use nakama_rs::matchmaker::{Matchmaker, QueryItemBuilder}; add_wasm...
the_stack
use crate::core::config::Config; use crate::core::layer::Layer; use crate::service::tileset::Tileset; fn layer_from_config(toml: &str) -> Result<Layer, String> { use crate::core::parse_config; let config = parse_config(toml.to_string(), ""); Layer::from_config(&config?) } #[test] fn test_query_config() {...
the_stack
mod bitnum; pub mod checksum; mod factor; mod keyval; pub mod utils; pub mod crc; pub(crate) mod endian; pub mod fletcher; pub mod modsum; use bitnum::BitNum; use checksum::{CheckBuilderErr, CheckReverserError}; use checksum::{Digest, LinearCheck, RangePair}; use crc::{reverse_crc, CRCBuilder, CRC}; use fletcher::{re...
the_stack
#![allow(non_camel_case_types, dead_code)] #![allow(missing_docs, missing_debug_implementations, missing_copy_implementations)] use libc; use super::types as cl; #[cfg_attr(target_os = "macos", link(name = "OpenCL", kind = "framework"))] #[cfg_attr(not(target_os = "macos"), link(name = "OpenCL"))] extern { /* Pla...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_cas...
the_stack
use std::f32::consts::PI; use ultraviolet::{Rotor3, Vec3}; use wgpu_pbr::{Camera, Renderer, Scene, PointLight}; use winit::{ event_loop::{ControlFlow, EventLoop}, event::{self, WindowEvent, MouseScrollDelta}, }; fn main() { let event_loop = EventLoop::new(); let title = "wgpu-pbr basic example"; ...
the_stack
use gc_arena::MutationContext; use crate::{Callback, CallbackResult, Root, RuntimeError, String, Table, Value}; use rand::{Rng, SeedableRng}; use rand_xoshiro::Xoshiro256StarStar; use std::{cell::RefCell, ops::DerefMut, rc::Rc}; pub fn load_math<'gc>(mc: MutationContext<'gc, '_>, _: Root<'gc>, env: Table<'gc>) { ...
the_stack
use crate::bus::VIRTIO_BASE; use crate::cpu::{Cpu, BYTE, DOUBLEWORD, HALFWORD, WORD}; use crate::exception::Exception; /// The interrupt request of virtio. pub const VIRTIO_IRQ: u64 = 1; /// The size of `VRingDesc` struct. const VRING_DESC_SIZE: u64 = 16; /// The number of virtio descriptors. It must be a power of tw...
the_stack
use crate::features::Feature; use crate::into_model::IntoModel; use crate::scope::Scope; use core::errors::Error; use core::flavored::*; use core::{Diagnostics, Import, RpStringValidate, Span, Spanned, Version, WithSpan}; use std::collections::HashMap; /// `#![feature(..)]` attributes. pub fn features<'s, I>( scop...
the_stack
use crate::{ arch::Architecture, bindings::{ kernel::{sock_fprog, user, user_desc, CAP_SYS_ADMIN, NT_X86_XSTATE}, ptrace::{ ptrace, PTRACE_CONT, PTRACE_EVENT_CLONE, PTRACE_EVENT_EXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_SECCOMP, PTRACE_EVENT_VFORK, PTRACE_GETEVENTMSG, PTRACE_...
the_stack
use std::{collections::BTreeSet, sync::Arc}; use datasize::DataSize; use derive_more::Display; use casper_types::{PublicKey, U512}; use crate::{ components::consensus::{ cl_context::{ClContext, Keypair}, config::Config, consensus_protocol::{ConsensusProtocol, ProtocolOutcome}, hig...
the_stack
use std::thread::JoinHandle; use eframe::egui::epaint::Shadow; use eframe::egui::{self, Color32, Pos2, Rect, Response, Stroke}; use ps_core::eyre::{self, Result}; use ps_core::rand::{self, seq::SliceRandom}; use super::super::platform::platform_colors; use super::super::widgets::background::{shadow_background, Animat...
the_stack
// The tree builder rules, as a single, enormous nested match expression. use markup5ever::{expanded_name, local_name, namespace_prefix, namespace_url, ns}; use crate::tokenizer::states::{Plaintext, Rawtext, Rcdata, ScriptData}; use crate::tree_builder::tag_sets::*; use crate::tree_builder::types::*; use std::borrow:...
the_stack
use std::default::Default; use std::path::PathBuf; use std::str::FromStr; use audio_streams::shm_streams::{NullShmStreamSource, ShmStreamSource}; use base::{error, AsRawDescriptor, RawDescriptor}; #[cfg(feature = "audio_cras")] use libcras::{CrasClient, CrasClientType, CrasSocketType, CrasSysError}; use remain::sorted...
the_stack
use crate::{CbAction, EventId, OpMeta, SignalKind}; use std::mem::swap; use tremor_common::ids::SourceId; use tremor_common::time::nanotime; use tremor_script::prelude::*; use tremor_script::{literal, EventOriginUri, EventPayload, Value}; /// A tremor event #[derive( Debug, Clone, PartialEq, Default, simd_json_der...
the_stack
use alloc::vec::Vec; #[cfg(feature = "heap_alloc")] use core::marker::PhantomData; /// The different kinds of cartridges that can be handled. Each has a /// specific way of managing memory/providing additional capabilities. #[derive(PartialEq, Debug)] #[cfg_attr(feature = "serialisation", derive(Serialize, Deseriali...
the_stack
pub const _LIBC_LIMITS_H_: u32 = 1; pub const _FEATURES_H: u32 = 1; pub const _DEFAULT_SOURCE: u32 = 1; pub const __GLIBC_USE_ISOC2X: u32 = 0; pub const __USE_ISOC11: u32 = 1; pub const __USE_ISOC99: u32 = 1; pub const __USE_ISOC95: u32 = 1; pub const __USE_POSIX_IMPLICITLY: u32 = 1; pub const _POSIX_SOURCE: u32 = 1; p...
the_stack
use std::collections::VecDeque; use std::convert::TryFrom; use std::fmt::Display; use std::fs; use std::path::Path; use std::sync::Arc; use snafu::ResultExt; use libeir_diagnostics::{CodeMap, SourceSpan}; use libeir_util_parse::{FileMapSource, Scanner, Source}; use crate::lexer::{AtomToken, SymbolToken, TokenConvert...
the_stack
use crate::prelude::*; use crate::control::callback; use crate::data::dirty; use crate::data::dirty::traits::*; use crate::display; use crate::display::scene::Scene; use nalgebra::Perspective3; // ============== // === Screen === // ============== /// Camera's frustum screen dimensions. #[derive(Clone, Copy, Debu...
the_stack
use arret_syntax::span::Span; use arret_runtime::abitype; use arret_runtime::boxed; use arret_runtime::boxed::prelude::*; use crate::codegen::GenAbi; use crate::mir::builder::{Builder, BuiltReg, TryToBuilder}; use crate::mir::costing::{cost_for_op_category, cost_for_ops}; use crate::mir::eval_hir::EvalHirCtx; use cra...
the_stack
use std::{collections::hash_map::HashMap, hash::Hash}; use cfgrammar::{yacc::YaccGrammar, Symbol, TIdx}; use num_traits::{AsPrimitive, PrimInt, Unsigned}; use try_from::TryFrom; use crate::{itemset::Itemset, StIdx, StIdxStorageT}; #[derive(Debug)] pub struct StateGraph<StorageT: Eq + Hash> { /// A vector of `(co...
the_stack
use std::mem; use std::cmp::max; use std::hash::Hash; use std::borrow::Borrow; use std::collections::HashMap; use slab::Slab; pub struct HeapMap<K, T, V> where K: Hash+Eq+Clone, T: Ord { /// Heap of (timestamp, slab-index) heap: Heap<(T, usize)>, /// Map of {key: slab-index} map: HashMap<K, usize>...
the_stack
use std::cell::{Ref, RefCell}; use std::future::Future; use std::process::{Command, Stdio}; use std::rc::Rc; use futures::channel::oneshot; use futures::stream::SplitSink; use futures::StreamExt; use lsp_codec::LspCodec; use lsp_types::notification::{Notification, PublishDiagnostics}; use lsp_types::PublishDiagnostics...
the_stack
use clap::{App, Arg}; use fantoch::metrics::Histogram; use fantoch::run::chan::{ChannelReceiver, ChannelSender}; use fantoch::run::task; use fantoch::time::{RunTime, SysTime}; use fantoch::HashMap; use parking_lot::Mutex; use rand::Rng; use std::cmp::max; use std::collections::BTreeSet; use std::error::Error; use std::...
the_stack
//! Layout visitor // Methods have to take `&mut self` #![allow(clippy::wrong_self_convention)] use super::{Align, AlignHints, AxisInfo, MarginSelector, SizeRules}; use super::{DynRowStorage, RowPositionSolver, RowSetter, RowSolver, RowStorage}; use super::{GridChildInfo, GridDimensions, GridSetter, GridSolver, GridS...
the_stack
use bufstream::BufStream; use std::collections::HashMap; use std::net::{Shutdown, SocketAddr, TcpListener, TcpStream}; use std::sync::{Arc, Mutex, RwLock}; use std::time::Instant; use std::{thread, time}; use rand::Rng; use failure::Error; use grin_util::from_hex; use grin_core::pow::Proof; use grin_core::core::BlockH...
the_stack
use super::super::c; #[cfg(not(target_os = "wasi"))] use bitflags::bitflags; #[cfg(any(target_os = "android", target_os = "linux"))] bitflags! { /// `RWF_*` constants for use with [`preadv2`] and [`pwritev2`]. /// /// [`preadv2`]: crate::io::preadv2 /// [`pwritev2`]: crate::io::pwritev pub struct R...
the_stack
#![allow(dead_code)] use self::symbol_table::{Key, KeyRef, SymbolTable, SymbolTableIndex}; use super::TagU16; use fnv::FnvHashMap; use quickfix::{ParseDictionaryError, QuickFixReader}; use std::collections::HashMap; use std::fmt; use std::sync::Arc; pub use datatype::FixDatatype; pub trait DataFieldLookup<F> { f...
the_stack
use crate::schema::*; use crate::JsonSchema; use crate::{gen::SchemaGenerator, Map}; use serde_json::{Error, Value}; use std::{convert::TryInto, fmt::Display}; pub(crate) struct Serializer<'a> { pub(crate) gen: &'a mut SchemaGenerator, pub(crate) include_title: bool, } pub(crate) struct SerializeSeq<'a> { ...
the_stack
use crate::{ CHECK, engine_traits::EngineOperations, shard_state::{ShardHashesStuff, ShardStateStuff}, types::messages::MsgEnqueueStuff, }; use std::{ cmp::max, iter::Iterator, sync::{Arc, atomic::{AtomicBool, Ordering}}, collections::HashMap, }; use ton_block::{ BlockIdExt, ShardIdent, Seri...
the_stack
//! Provides a parser from syn attributes to our logical model. use syn::{self, Meta, NestedMeta, Lit, Ident, Attribute, Expr, Type}; use crate::util; use crate::interp; use crate::error::{self, Ctx, DeriveResult}; //============================================================================== // Public API //=====...
the_stack
use crate::services::broker::MessageBroker; use crate::services::director::ServicesDirector; use crate::services::envelope::ServiceEnvelope; use crate::services::service::{Service, ServiceConcurrency}; use crate::services::system_facade::ServiceAssistant; use crate::system_director::SystemDirector; use async_channel::{...
the_stack
pub mod error; pub mod reply; pub mod request; use self::{ error::StarknetError, request::{add_transaction::ContractDefinition, Call}, }; use crate::{ core::{ CallSignatureElem, ClassHash, ConstructorParam, ContractAddress, ContractAddressSalt, Fee, StarknetTransactionHash, StorageAddress, ...
the_stack
use crate::config::TextureFormat; use crate::error::{Error, Result}; use crate::gst; use crate::gst::prelude::*; use crate::gst_app; use crate::gst_audio; use crate::resource::{ResourceData, ResourceData2D}; use crate::stream::Stream; use byte_slice_cast::*; use std; use std::convert::TryInto; use std::error::Error as ...
the_stack
//! Unique key map bin operations. Create map operations used by the client's `operate()` method. //! //! All maps maintain an index and a rank. The index is the item offset from the start of the map, //! for both unordered and ordered maps. The rank is the sorted index of the value component. //! Map supports negative...
the_stack
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // STD Dependencies...
the_stack
use crate::{ compact_trivia::CompactTrivia, compact_trivia::TriviaKinds, syntax_by_ref::positioned_trivia::{self, PositionedTrivia}, trivia_factory::SimpleTriviaFactoryImpl, }; use bumpalo::Bump; pub type PositionedToken<'a> = internal::PositionedToken<'a, usize>; pub type TokenFactory<'a> = inter...
the_stack
use crypto::digest::Digest; use crypto::sha1::Sha1; use std::cmp; use std::collections::{BTreeMap, HashMap, HashSet}; use std::convert::TryInto; use std::fs::{self, File, OpenOptions}; use std::io::{self, ErrorKind, Read, Write}; use std::os::unix::fs::MetadataExt; use std::path::{Path, PathBuf}; use std::str; use cra...
the_stack
//! Defines the QUIC connection ID use crate::{ event::{api::SocketAddress, IntoEvent}, inet, transport, }; use core::{ convert::{TryFrom, TryInto}, time::Duration, }; use s2n_codec::{decoder_value, Encoder, EncoderValue}; #[cfg(any(test, feature = "generator"))] use bolero_generator::*; //= https://...
the_stack
use futures::future::TryFutureExt; use futures::stream::FuturesUnordered; use futures::stream::StreamExt; use maplit::btreeset; use tokio::time::timeout; use tokio::time::Duration; use tracing::Instrument; use crate::core::apply_to_state_machine; use crate::core::LeaderState; use crate::core::ServerState; use crate::e...
the_stack
extern crate pretty_assertions; extern crate ratel; use ratel::ast::expression::*; use ratel::ast::statement::*; use ratel::ast::{ExpressionList, ExpressionNode, StatementList, StatementNode}; use ratel::ast::{Identifier, Literal, Node, NodeList, Pattern}; use ratel::Module; mod expression; mod function; mod stateme...
the_stack
use std::ffi::CString; use std::mem; use std::os::raw::{c_char, c_int}; #[allow(dead_code)] #[allow(non_snake_case)] #[allow(non_camel_case_types)] #[allow(non_upper_case_globals)] #[allow(improper_ctypes)] #[allow(unknown_lints)] pub mod ffi { #![allow(clippy::all)] include!(concat!(env!("OUT_DIR"), "/binding...
the_stack
use crate::lint::LintError; use crate::{repo_root, Check, Lint}; use anyhow::{bail, Context, Result}; use serde::{de, Deserialize, Deserializer}; use std::fmt::Write; use std::path::{Path, PathBuf}; use std::process::Command; use std::str::FromStr; const EXAMPLE_ENTRY: &str = r#" # Example changelog entries # [[aws-sd...
the_stack
//! Simulations in computational chemistry are often made using periodic //! boundaries conditions. The `UnitCell` type represents the enclosing box of //! a simulated system, with some type of periodic condition. use std::f64; use std::f64::consts::PI; use crate::{Matrix3, Vector3D}; /// The shape of a cell determin...
the_stack
use crate::controlflow::{Branch, ControlFlow, Unbranch}; use crate::error::{Error, Result}; use crate::{Col, Expr, ExprKind, ExprMutVisitor, FuncKind, Pred, PredFuncKind, QueryID}; use std::cmp::Ordering; use std::mem; use xngin_datatype::{Collation, PreciseType, Typed}; #[inline] pub fn fix_rec<F: Fn(QueryID, u32) ->...
the_stack
use rustling_ontology_values::check::*; use rustling_ontology_moment::*; use rustling_ontology_values::dimension::*; use rustling_ontology_values::ResolverContext; pub fn examples_percentage(v: &mut Vec<::rustling::train::Example<Dimension>>) { example!(v, check_percentage(0.3), "0,3%", "zéro virgule trois pour ce...
the_stack
use webcore::value::Reference; use webcore::try_from::TryInto; use webapi::event::{IEvent, Event}; // Used by KeyboardEvent and MouseEvent to get the state of a modifier key. pub(crate) fn get_event_modifier_state< T: IEvent >( event: &T, key: ModifierKey ) -> bool { js!( return @{event.as_ref()}.getModifi...
the_stack
// Needed until https://github.com/rust-lang/rust-clippy/pull/8183 is resolved. #![allow(clippy::identity_op)] use crate::ir::term::extras::Letified; use crate::ir::term::*; use crate::target::ilp::Ilp; use crate::target::r1cs::trans::bitsize; use good_lp::{variable, Expression}; use log::debug; use std::cell::RefCe...
the_stack
use crate::join_context; use super::IndexedParallelIterator; use std::cmp; use std::usize; /// The `ProducerCallback` trait is a kind of generic closure, /// [analogous to `FnOnce`][FnOnce]. See [the corresponding section in /// the plumbing README][r] for more details. /// /// [r]: https://github.com/rayon-rs/rayon...
the_stack
use crate::{ ast::{self, Span}, relations::ReferentialAction, types::SortOrder, }; use diagnostics::DatamodelError; use std::{error, fmt}; /// Wraps a value and provides convenience methods for /// validating it. pub struct ValueValidator<'a> { /// The underlying AST expression. pub value: &'a ast:...
the_stack
use assert_cmd::Command; use predicates::prelude::*; use rand::{distributions::Alphanumeric, Rng}; use std::fs::{self, File}; use std::io::Read; type TestResult = Result<(), Box<dyn std::error::Error>>; const PRG: &str = "tailr"; const EMPTY: &str = "tests/inputs/empty.txt"; const ONE: &str = "tests/inputs/one.txt"; ...
the_stack
use super::{ raw::{BytesDataType, Endian}, BaseExpr, NodeMetas, }; use crate::errors::{error_generic, Result}; use crate::prelude::*; use crate::{stry, Value}; use byteorder::{BigEndian, ByteOrder}; // We are truncating for so we can write parts of the values #[allow(clippy::cast_possible_truncation)] fn write...
the_stack
use crate::config::{Config, EnvConfig}; use crate::error::ErrorKind; use crate::page::{DiffOp, Line, Page}; use crate::service::build_page_url; use crate::test::helper::{empty_env, get_root_dir, https_proxy}; use std::path::Path; const OPEN: Page = Page::Open { website: false, pull_request: false, }; const OPE...
the_stack
use crate::module::AddrSpace; use either::Either; use std::borrow::Borrow; use std::collections::HashMap; use std::fmt::{self, Display}; use std::hash::Hash; use std::ops::Deref; use std::sync::Arc; /// See [LLVM 12 docs on Type System](https://releases.llvm.org/13.0.0/docs/LangRef.html#type-system) #[derive(PartialEq...
the_stack
use super::{ build_composites, field_builders::RelationFieldBuilder, relation_builder::RelationBuilder, CompositeTypeBuilder, FieldBuilder, IndexBuilder, ModelBuilder, PrimaryKeyBuilder, }; use crate::{ builders::{CompositeFieldBuilder, ScalarFieldBuilder}, extensions::*, IndexType, InlineRelation, ...
the_stack
use std::collections::HashSet; use crate::error::{Error, Result}; use crate::query::parser::{ast::Expr as QueryExpr, expr::expr as query_expr}; use crate::utils::parse::{ label_identifier, maybe_lpadded, separated_list, string_literal, IResult, ParseError, Span, }; use nom::{ branch::alt, bytes::complete:...
the_stack
#[non_exhaustive] #[derive(std::fmt::Debug)] pub struct CreateEnvironmentError { /// Kind of error that occurred. pub kind: CreateEnvironmentErrorKind, /// Additional metadata about the error, including error code, message, and request ID. pub(crate) meta: aws_smithy_types::Error, } /// Types of errors ...
the_stack
use { crate::format::CodeStr, colored::ColoredString, std::{ cmp::Ordering, hash::{Hash, Hasher}, }, }; // This is a case-insensitive identifier. This struct provides two benefits over just using // `String` directly: // // 1. It makes case-insensitive operations like equality testing...
the_stack
use eyre::{Context, ContextCompat, Result}; use fuse_rust::Fuse; use gdk::{keys, EventKey}; use gio::prelude::*; use gladis::Gladis; use glib::Type; use gtk::prelude::*; use gtk::{Dialog, Entry, TreePath, TreeView, Window}; use once_cell::unsync::OnceCell; use shrinkwraprs::Shrinkwrap; use crate::{script::Script, scri...
the_stack
use inline_spirv::*; use std::collections::HashSet; use super::*; macro_rules! gen_entries( ($stage:ident, $src:expr, $lang:ident) => {{ static SPV: &'static [u32] = inline_spirv!($src, $stage, $lang, vulkan1_2); SPV.iter().copied().collect::<SpirvBinary>().reflect_vec().unwrap() }} ); macro_ru...
the_stack
use crate::{ ciphersuite::CipherSuite, errors::{utils::check_slice_size, InternalError, ProtocolError}, group::Group, hash::Hash, keypair::{KeyPair, PublicKey}, opaque::{bytestrings_from_identifiers, Identifiers}, }; use alloc::vec; use alloc::vec::Vec; use core::convert::TryFrom; use digest::Di...
the_stack
use ::keys::Address; use constants::block_version::BlockVersion; use log::{debug, info}; use proto::state::{proposal::State as ProposalState, Proposal}; use state::keys; use state::keys::ChainParameter; use super::super::version_fork::ForkController; use crate::Manager; /// Proposal controller to handle proposals dur...
the_stack
use super::{ElfResult, ElfWord, Section, section}; use super::ValidatesWord; use section::Header as SectionHeader; use core::{fmt, mem, convert}; use core::ops::Range; /// Trait representing an ELF File Header. /// /// This trait allows [HeaderRepr] to provide a consistent API regardless /// of whether the header se...
the_stack
mod rtp_receiver_test; use crate::api::media_engine::MediaEngine; use crate::dtls_transport::RTCDtlsTransport; use crate::error::{flatten_errs, Error, Result}; use crate::peer_connection::sdp::TrackDetails; use crate::rtp_transceiver::rtp_codec::{ codec_parameters_fuzzy_search, CodecMatch, RTCRtpCodecCapability, R...
the_stack
use crate::dedup::does_line_exist_and_set; use crate::postgres::SubsetStrategy::RandomPercent; use crate::{ utils, PassthroughTable, Progress, Subset, SubsetOptions, SubsetTable, SubsetTableRelation, }; use dump_parser::postgres::{ get_column_names_from_insert_into_query, get_column_values_str_from_insert_into_...
the_stack
use crate::math::{Point, Real, Vector, DIM}; use crate::transformation::vhacd::VHACDParameters; use crate::transformation::voxelization::{VoxelSet, VoxelizedVolume}; use std::sync::Arc; #[cfg(feature = "dim2")] type ConvexHull = Vec<Point<Real>>; #[cfg(feature = "dim3")] type ConvexHull = (Vec<Point<Real>>, Vec<[u32; ...
the_stack
use super::ext::*; use super::generics::ParsedGenerics; use crate::util::*; use itertools::*; use proc_macro2::TokenStream; use quote::*; use std::collections::HashMap; use syn::parse::{Parse, ParseStream}; use syn::*; /// Describes information about a single trait. pub struct TraitInfo { path: Path, ident: Id...
the_stack
use std::cmp; use std::fmt; use std::io; use std::ops::Deref; #[cfg(feature = "termcolor")] use termcolor::{ColorSpec, WriteColor}; use Doc; /// Trait representing the operations necessary to render a document pub trait Render { type Error; fn write_str(&mut self, s: &str) -> Result<usize, Self::Error>; ...
the_stack
use std::ffi::OsStr; use std::fs; use std::fs::File; use std::io::Read; use std::io::Write; use std::path::{Path, PathBuf}; use crate::tools::asset_info::Search; use asset::EpicAsset; use glib::clone; use gtk4::{self, gdk_pixbuf, prelude::*, CustomSorter}; use gtk4::{gio, glib, subclass::prelude::*, CompositeTemplate}...
the_stack
use com::{interfaces, interfaces::IUnknown, Interface}; use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; use winapi::shared::{ basetsd::UINT32, dxgi::{CreateDXGIFactory1, DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}, dxgi1_2::{DXGI_SWAP_CHAIN_DESC1, DXGI_SWAP_CHAIN_FULLSCREEN_DESC}, dxgiformat::DXGI_F...
the_stack