text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use super::TraitDefinition; use crate::{ generator, traits::GenerateCode, }; use derive_more::From; use proc_macro2::{ Span, TokenStream as TokenStream2, }; use quote::{ quote, quote_spanned, }; impl<'a> TraitDefinition<'a> { /// Generates code for the global trait call builder for an ink! ...
the_stack
use super::visitors::{ BodyArrayVisitor, BodyObjectKeyVisitor, BodyObjectVisitor, BodyPrimitiveVisitor, BodyVisitors, }; use crate::queries::shape::{ChoiceOutput, ShapeQueries}; use crate::state::body::BodyDescriptor; use crate::state::shape::{ FieldId, FieldShapeDescriptor, FieldShapeFromShape, ShapeId, ShapeKind,...
the_stack
use super::lua_stack::LuaStack; use super::lua_value::LuaValue; use crate::api::consts::*; use crate::api::{LuaAPI, LuaVM}; use crate::binary::chunk::{Constant, Prototype}; pub struct LuaState { stack: LuaStack, proto: Prototype, pc: isize, } impl LuaState { pub fn new(stack_size: usize, proto: Protot...
the_stack
use crate::link::Link; use crate::point::Point; use crate::segment::Segment; use crate::vector::Vector; // // Collision happens when two particles collide // #[derive(Copy, Clone)] pub enum ParticleCollisionBehavior { DoNothing, DisableSelf, DestroySelf } // // Implement convertion function for Algorithm ...
the_stack
use crate::coin_helpers::validate_sent_sufficient_coin; use crate::error::ContractError; use crate::msg::{ CreatePollResponse, ExecuteMsg, InstantiateMsg, PollResponse, QueryMsg, TokenStakeResponse, }; use crate::state::{ bank, bank_read, config, config_read, poll, poll_read, Poll, PollStatus, State, Voter, }; ...
the_stack
use crate::{ arena::Arena, keys::{Key, Spur}, util::{Iter, Strings}, Rodeo, RodeoReader, }; use core::{marker::PhantomData, ops::Index}; compile! { if #[feature = "no-std"] { use alloc::vec::Vec; } } /// A read-only view of a [`Rodeo`] or [`ThreadedRodeo`] that allows contention-free a...
the_stack
//! A (mostly) lock-free concurrent work-stealing deque //! //! This module contains an implementation of the Chase-Lev work stealing deque //! described in "Dynamic Circular Work-Stealing Deque". The implementation is //! heavily based on the implementation using C11 atomics in "Correct and //! Efficient Work Stealing...
the_stack
use crate::error::{Error, Result}; use crate::join::estimate::Estimate; use crate::join::graph::{Edge, EdgeID, Graph, VertexID, VertexSet}; use crate::join::reorder::{JoinEdge, Reorder, Tree}; use crate::join::{JoinKind, JoinOp}; use crate::op::Op; use smallvec::{smallvec, SmallVec}; use std::borrow::Cow; use std::coll...
the_stack
use graph; use position::{Axis, Direction, Range, Rect}; use std::iter::once; use std::ops::{Deref, DerefMut}; use {color, widget, Color, Point, Positionable, Scalar, Sizeable, Ui, Widget}; /// A widget that acts as a convenience container for some `Node`'s unique widgets. #[derive(Clone, Debug, WidgetCommon_)] pub st...
the_stack
use super::Error; use crate::misc_utils; use crate::multihash; use crate::sbx_specs::{ver_to_data_size, Version}; use crate::time_utils; use std; use std::fmt; #[derive(Clone, Debug, PartialEq)] pub enum Metadata { FNM(String), SNM(String), FSZ(u64), FDT(i64), SDT(i64), HSH(multihash::HashBytes...
the_stack
use std::path::Path; use std::str::FromStr; use move_core_types::{ account_address::AccountAddress, identifier::Identifier, value::MoveTypeLayout, }; use serde_json::{json, Value}; use test_fuzz::runtime::num_traits::ToPrimitive; use sui_types::base_types::{ObjectID, SuiAddress, TransactionDigest}; use sui_types:...
the_stack
use super::*; use crate::mock::*; use frame_support::{assert_noop, assert_ok}; use frame_system::RawOrigin; #[test] fn create_pool_should_work() { new_test_ext().execute_with(|| { assert_ok!(AMM::create_pool( RawOrigin::Signed(ALICE).into(), (DOT, XDOT), (10, 20), ...
the_stack
mod common; use common::resource; use dfw::{ process::{Process, ProcessContext}, types::*, util::*, FirewallBackend, }; use serde::Deserialize; #[derive(Debug, Eq, PartialEq)] struct TestBackend; impl FirewallBackend for TestBackend where DFW<Self>: Process<Self>, { type Rule = String; typ...
the_stack
pub struct GetExclusionsPreviewPaginator< 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_exclusions_preview_input::Builder, } impl<C,...
the_stack
use std::{ collections::VecDeque, fs::{self, File}, io::{self, prelude::*, BufReader}, path::{Path, PathBuf}, sync::Arc, time::Duration, }; use console::style; use failure::{bail, format_err, ResultExt}; use indexmap::{IndexMap, IndexSet}; use itertools::Itertools; use reqwest::blocking::Client...
the_stack
use std::path::PathBuf; use std::fs::{create_dir_all, remove_file, read_dir, File, DirEntry}; use std::thread; use std::fmt::Debug; use std::io::{Read, ErrorKind}; use std::io::prelude::*; use futures::Stream; use futures::stream::MergedItem; use futures::sync::mpsc::{channel, unbounded, Sender, Receiver, UnboundedSen...
the_stack
use super::parsing::{ident, skip, sym, Parsable, ParseError, Parser}; use crate::util::Atom; use std::fmt; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Specificity(u32); // to be implemented by client pub trait MatchingContext: Sized { type ElementRef: Copy; fn parent_elemen...
the_stack
use std::slice; use arrayvec; use super::ROOTS; use super::{GridCoord, Point2, Point3, Root}; // We need to handle 9 different cases: // // 1 // ◌ ● ◌ // / \ 4/ \3 / \ // / \ / \ / \ // ◌ ● ● ◌ // \ \ 9 \5 \ // \ 6\ \ \ // ◌ ● ...
the_stack
use tensor::*; use std::cell::RefMut; use autograd::{Variable, VariableArgs, VarAccess, VarKind}; impl<T: NumLimits> Variable<T> { pub fn abs(&self) -> Self { unimplemented!() } pub fn abs_(self) -> Self { unimplemented!() } pub fn acos(&self) -> Self { unimplemented!() ...
the_stack
use crate::block_utils::RefBlockChoice; use crate::cli_utils::setup_ctrlc_handler; use crate::file_reader::{FileReader, FileReaderParam}; use crate::file_utils; use crate::general_error::Error; use crate::json_printer::{BracketType, JSONPrinter}; use crate::progress_report::*; use crate::reader::ReadResult; use crate::...
the_stack
use std::cmp::Ordering; use std::collections::BTreeMap; use std::hash::{Hash, Hasher}; use snafu::{ResultExt, Snafu}; use crate::lexer::symbols; use crate::parser::ast::{BinaryOp, Expr, Literal, UnaryOp}; use libeir_diagnostics::{Diagnostic, Label, SourceSpan, ToDiagnostic}; use libeir_intern::{Ident, Symbol}; use l...
the_stack
use peg::parser; use std::{ path::{Path, PathBuf}, rc::Rc, }; mod expr; pub use expr::*; pub use jrsonnet_interner::IStr; pub use peg; pub struct ParserSettings { pub loc_data: bool, pub file_name: Rc<Path>, } macro_rules! expr_bin { ($a:ident $op:ident $b:ident) => { Expr::BinaryOp($a, $op, $b) }; } macro_ru...
the_stack
use lorawan_encoding::creator::*; use lorawan_encoding::default_crypto::DefaultFactory; use lorawan_encoding::keys::*; use lorawan_encoding::maccommandcreator::*; use lorawan_encoding::maccommands::*; use lorawan_encoding::parser::*; fn phy_join_request_payload() -> Vec<u8> { let mut res = Vec::new(); res.exte...
the_stack
//! Oxischeme is an interpreter, but it is not a naiive AST walking //! interpreter. In contrast to an AST walking interpreter, syntactic analysis //! is separated from execution, so that no matter how many times an expression //! might be evaluated, it is only ever analyzed once. //! //! When evaluating a form, first ...
the_stack
mod token; mod labels; mod util; pub use lexer::token::*; use lexer::labels::*; use lexer::token::Token::*; use std::str; use error::Error; use toolshed::Arena; macro_rules! expect_byte { ($lex:ident) => ({ match $lex.read_byte() { 0 => return $lex.token = UnexpectedEndOfProgram, ...
the_stack
extern crate thanks; extern crate diesel; extern crate dotenv; extern crate futures; extern crate handlebars; extern crate reqwest; extern crate serde; extern crate serde_json; #[macro_use] extern crate slog; extern crate slog_term; extern crate clap; extern crate git2; use diesel::prelude::*; use clap::{App, ...
the_stack
use itertools::Itertools; use ritual::config::{Config, CrateDependencyKind, CrateDependencySource}; use ritual::cpp_checker::{PreliminaryTest, Snippet}; use ritual::cpp_data::{CppItem, CppPath, CppPathItem, CppTypeDeclaration, CppTypeDeclarationKind}; use ritual::cpp_ffi_data::CppFfiFunctionKind; use ritual::cpp_functi...
the_stack
use crate::{ buffer::{CellBuffer, Contacts, Span}, fragment, fragment::Arc, fragment::Circle, Cell, Point, Settings, }; use lazy_static::lazy_static; use std::{collections::BTreeMap, collections::HashMap, iter::FromIterator}; /// skip the first 3 circles for constructing our arcs, otherwise it will...
the_stack
use super::Error; use super::debug; use super::graph; use super::spans; use debug::{DebugCounters, NESTED_INDENT}; use graph::{BasicCoverageBlock, BcbBranch, CoverageGraph, TraverseCoverageGraphWithLoops}; use spans::CoverageSpan; use rustc_data_structures::graph::WithNumNodes; use rustc_index::bit_set::BitSet; use ...
the_stack
extern crate csv; use anyhow::Result; use csv::{Position, Reader, ReaderBuilder}; use std::cmp::max; use std::fs::File; use std::io::{BufRead, BufReader}; use std::sync::{Arc, Mutex}; use std::thread::{self, JoinHandle}; fn string_record_to_vec(record: &csv::StringRecord) -> Vec<String> { let mut string_vec = Vec...
the_stack
use fasteval::{Parser, Compiler, Evaler, Error, Slab, EmptyNamespace, CachedCallbackNamespace, ExpressionI, InstructionI, eval_compiled, eval_compiled_ref}; use fasteval::parser::{PrintFunc, ExpressionOrString::{EExpr, EStr}}; #[cfg(feature="eval-builtin")] use fasteval::parser::{EvalFunc, KWArg}; use fasteval::compile...
the_stack
use crate::model::{Model, ModelFile, Type}; use anyhow::Context as _; use heck::CamelCase; use itertools::Either; use once_cell::sync::Lazy; use regex::Regex; use std::borrow::Cow; use std::collections::{BTreeMap, HashMap}; use std::ops::Range; use std::rc::Rc; pub struct DataFile { pub contents: String, pub n...
the_stack
extern crate binjs; extern crate clap; extern crate rand; extern crate separator; use binjs::io::entropy::dictionary::{DictionaryBuilder, Options as DictionaryOptions}; use binjs::io::entropy::write::Encoder; use binjs::io::entropy::Options; use binjs::io::{Path as IOPath, Serialization, TokenSerializer}; use binjs::s...
the_stack
use std::fmt::Display; use std::time::Duration; use crate::{ connectors::{ impls::http::utils::Header, prelude::*, sink::concurrency_cap::ConcurrencyCap, utils::tls::TLSClientConfig, }, errors::{err_conector_def, Error, Result}, }; use async_std::channel::{bounded, Receiver, Sender}; use ei...
the_stack
//! Representation of constant values and their operations //! //! This module implements a representation for values that may arise within a //! SystemVerilog source text and provides ways of executing common operations //! such as addition and multiplication. It also provides the ability to //! evaluate the constant ...
the_stack
use crate::RUST_VERSION; use maud::{self, html, PreEscaped}; pub fn search_form( action: &str, placeholder: &str, value: &str, regex: bool, ) -> PreEscaped<String> { html! { form action=(action) { div class="row" { div class="col-md-12" style="margin-top: 20pt" {...
the_stack
//! Implementation of primitive procedures. use environment::{ActivationPtr, Environment}; use eval::{apply_invocation, Trampoline, TrampolineResult}; use heap::{Heap, Rooted}; use read::{Read}; use value::{RootedValue, Value}; /// The function signature for primitives. pub type PrimitiveFunction = fn(&mut Heap, Vec<...
the_stack
//! Deserialization for BinProt following the standard serde module layout use crate::error::{Error, Result}; #[cfg(feature = "loose_deserialization")] use crate::value::layout::*; use crate::ReadBinProtExt; use byteorder::{LittleEndian, ReadBytesExt}; use serde::de::{self, value::U8Deserializer, EnumAccess, IntoDeser...
the_stack
use crypto::signatures::ed25519; use identity_core::common::Fragment; use identity_core::common::Object; use identity_core::common::Url; use identity_core::crypto::PublicKey; use identity_did::verification::MethodData; use identity_did::verification::MethodScope; use identity_did::verification::MethodType; use identit...
the_stack
use std::{result::Result, sync::Arc}; use matrix_sdk_base::{ crypto::{ MasterPubkey, OwnUserIdentity as InnerOwnUserIdentity, UserIdentity as InnerUserIdentity, }, locks::RwLock, }; use ruma::{ events::{ key::verification::VerificationMethod, room::message::{MessageEventContent,...
the_stack
use crate::traits::{Emitter, EmitterExt}; use crossbeam_channel as chan; pub mod utils; pub trait CascadeTrait: 'static + Send { /// Register the cascade input `Receiver`. /// This function must register exactly one `Receiver` and /// return the index (as returned from [`Select::recv`](crossbeam_channel::...
the_stack
use alloc::borrow::Cow; use alloc::boxed::Box; use alloc::rc::Rc; use alloc::sync::Arc; use alloc::vec::Vec; use core::iter::FromIterator; use tinyvec::TinyVec; use crate::array::tinyvec::TinyArray; use crate::array::vec::Array; use crate::array::INLINE_CAPACITY; impl<T> From<Vec<T>> for TinyArray<T> where T: De...
the_stack
use crate::context::CommandContext; use crate::version::Api; use crate::version::Version; use crate::DrawError; use crate::gl; /// Represents the depth parameters of a draw command. #[derive(Debug, Copy, Clone)] pub struct Depth { /// The function that the GPU will use to determine whether to write over an existi...
the_stack
extern crate bn; extern crate rand; extern crate snark; extern crate crossbeam; extern crate rustc_serialize; extern crate blake2_rfc; extern crate bincode; extern crate byteorder; #[macro_use] extern crate log; extern crate env_logger; extern crate time; extern crate ansi_term; #[macro_use] mod protocol; use self::p...
the_stack
mod genotypes; pub mod info; pub use self::{genotypes::read_genotypes, info::read_info}; use std::io::{self, Read}; use byteorder::{LittleEndian, ReadBytesExt}; use noodles_vcf::record::{AlternateBases, Ids, Position, QualityScore, ReferenceBases}; use super::value::read_value; use crate::{ record::{Filters, Va...
the_stack
use crate::fs::Fs; use crate::sort::dependency_order; use anyhow::{Context, Result}; use cargo_toml::{Dependency, DepsSet, Manifest}; use semver::Version; use std::collections::{BTreeMap, BTreeSet}; use std::error::Error as StdError; use std::fmt; use std::path::{Path, PathBuf}; use tokio::fs; use tracing::warn; #[der...
the_stack
use std::{ fmt, io::{self, Write}, mem, net::Ipv4Addr, }; use crate::tlv::{Tlv, TlvReadExt, TlvWriteExt}; use byteorder::{ByteOrder, ReadBytesExt, WriteBytesExt}; use pnet::util::MacAddr; // ===== Discovery Command ===== #[derive(PartialEq, Copy, Clone, Debug)] pub enum OpnFiDiscoveryCommand { //...
the_stack
use super::event::*; use crate::control::*; use crate::property::*; use crate::controller::*; use flo_stream::*; use flo_binding::*; use itertools::*; use futures::*; use futures::future::{BoxFuture}; use std::mem; use std::sync::*; use std::collections::{HashSet, HashMap}; /// /// Core UI session structures /// pu...
the_stack
mod invoker; mod output_bindings; use crate::{attribute_args_from_name, parse_attribute_args}; use azure_functions_shared::codegen::{ bindings::{ Binding, BindingFactory, INPUT_BINDINGS, INPUT_OUTPUT_BINDINGS, OUTPUT_BINDINGS, TRIGGERS, VEC_INPUT_BINDINGS, VEC_OUTPUT_BINDINGS, }, get_string...
the_stack
macro_rules! private_parse_path { // Entry point. Dup tokens. { $caller:tt input = [{ $($input:tt)* }] } => { $crate::private_parse_path! { $caller tokens = [{ $($input)* }] _tokens = [{ $($input)* }] } }; // Parse absolute path. ...
the_stack
extern crate rand; extern crate time; extern crate timely; extern crate graph_map; extern crate alg3_dynamic; use std::sync::{Arc, Mutex}; use alg3_dynamic::*; use timely::dataflow::*; use timely::dataflow::operators::*; use timely::dataflow::operators::capture::Extract; use graph_map::GraphMMap; #[allow(non_snake...
the_stack
use super::{cluster::Boundary, Codepoint, LineBreak, Properties, WordBreak}; use core::borrow::Borrow; /// Returns an iterator yielding unicode properties and boundary analysis for /// each character in the specified sequence. pub fn analyze<I>(chars: I) -> Analyze<I::IntoIter> where I: IntoIterator, I::IntoIt...
the_stack
use crate::error::*; use git2::build::{CheckoutBuilder, RepoBuilder}; use git2::{Config, FetchOptions, Repository}; use std::path::Path; use tracing::{debug, info, warn}; /// clone a repository at a rev to a directory // TODO id the directory is already present then fetch and rebase (if not in offline mode) #[tracing:...
the_stack
use anyhow::{Context, Error}; use enquote; use std::collections::HashMap; use std::fs::{File, OpenOptions}; use std::io::{Read, Write}; use std::path::{Path, PathBuf}; use std::{env, process}; use structopt::{clap, StructOpt}; use sv_parser::Error as SvParserError; use sv_parser::{parse_sv, Define, DefineText}; use svl...
the_stack
use crate::error::{Error, Result, ResultLiquidExt}; use crate::model::Value; use crate::runtime::Expression; use crate::runtime::Renderable; use crate::runtime::Variable; use super::Language; use super::Text; use super::{Filter, FilterArguments, FilterChain}; use pest::Parser; mod inner { #[derive(Parser)] #...
the_stack
#![allow(clippy::blacklisted_name)] use std::str::FromStr; use base64ct::{Base64, Encoding}; use move_binary_format::file_format; use crate::crypto::{get_key_pair_from_bytes, AuthoritySignature, KeyPair}; use crate::{ crypto::{get_key_pair, BcsSignable, Signature}, gas_coin::GasCoin, object::Object, ...
the_stack
use anyhow::Result; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] #[serde(transparent)] pub struct SourceCoverage { pub files: Vec<SourceFileCoverage>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct SourceFileCoverage { ...
the_stack
use super::dependency_graph::DependencyGraph; use super::jit::{Jit, JitKey}; use super::mir_optimizer; use super::Transaction; use crate::codegen::{ block, data_analyzer, editor, globals, root, runtime_lib, surface, ObjectCache, Optimizer, TargetProperties, }; use crate::mir::{ Block, BlockRef, IdAllocator,...
the_stack
use std::collections::HashMap; use std::fs::{self, OpenOptions}; use std::io::prelude::*; use std::path::{Path, PathBuf}; use chrono::Utc; use swirl::PerformError; use tempfile::TempDir; use url::Url; use crate::background_jobs::Environment; use crate::models::{DependencyKind, Version}; use crate::schema::versions; ...
the_stack
use std::collections::{HashSet, BTreeMap}; use std::vec::Vec; use std::fmt::{Formatter, Result, Display}; use crate::data::Event::*; use crate::hover_messages; /* * Basic Data Structure Needed by Lifetime Visualization */ pub static LINE_SPACE: i64 = 30; // Top level Api that the Timeline object supports pub trait Vi...
the_stack
use super::{ assert_error, connect_force_idle, default_client, default_server, new_client, new_server, AT_LEAST_PTO, }; use crate::events::{ConnectionEvent, OutgoingDatagramOutcome}; use crate::frame::FRAME_TYPE_DATAGRAM; use crate::packet::PacketBuilder; use crate::quic_datagrams::MAX_QUIC_DATAGRAM; use crate:...
the_stack
use super::*; use crate::{semantic_analysis::*, types::*, CallPath, Ident, TypeArgument, TypeParameter}; use sway_types::{span::Span, Spanned}; use derivative::Derivative; use std::{ collections::HashSet, fmt, hash::{Hash, Hasher}, }; #[derive(Debug, Clone, Hash, PartialEq)] pub enum AbiName { Defer...
the_stack
#![warn(clippy::all)] #![allow(clippy::trivial_regex)] #![deny(rust_2018_idioms)] mod error; mod extern_call; mod function_call; mod instruction; mod stack; use anyhow::{Context as _, Result}; pub use error::Error; use std::io::Write as _; use std::{ collections::{hash_map::Entry, HashMap}, convert::TryInto,...
the_stack
pub struct ListContributorInsightsPaginator< C = aws_smithy_client::erase::DynConnector, M = crate::middleware::DefaultMiddleware, R = aws_smithy_client::retry::Standard, > { handle: std::sync::Arc<crate::client::Handle<C, M, R>>, builder: crate::input::list_contributor_insights_input::Builder, } i...
the_stack
use std::io::Read; use std::io::Write; use bufstream::BufStream; use protocol::cmd::Cmd; use protocol::cmd::Delete; use protocol::cmd::FlushAll; use protocol::cmd::Get; use protocol::cmd::GetInstr; use protocol::cmd::Inc; use protocol::cmd::IncInstr; use protocol::cmd::Resp; use protocol::cmd::Set; use protocol::cmd:...
the_stack
use js_sys::{Array, Error, JsString, Object, Uint32Array}; use std::collections::HashMap; use std::io::Cursor; use tract_core::internal::ToDim; use tract_hir::internal::tract_num_traits::AsPrimitive; use tract_hir::prelude::*; use tract_onnx::prelude::*; use tract_tensorflow::prelude::*; use wasm_bindgen::prelude::*; u...
the_stack
use std::{ collections::VecDeque, iter::FromIterator, sync::{Arc, Mutex}, }; use rbx_dom_weak::{types::Ref, InstanceBuilder, WeakDom}; use rbx_reflection::ClassTag; use rlua::{Context, FromLua, MetaMethod, ToLua, UserData, UserDataMethods}; #[derive(Clone)] pub struct LuaInstance { pub tree: Arc<Mutex...
the_stack
use ndarray::Array1; /// An interface for differentiable transformations. pub trait Transform<T: ?Sized> { type Output; /// Return the value of the transform for input `x`. fn transform(&self, x: T) -> Self::Output; /// Return the gradient of the transform for input `x`. fn grad(&self, x: T) -> T...
the_stack
mod convert; mod windowed_stats; use { crate::telemetry::{convert::convert_disconnect_source, windowed_stats::WindowedStats}, fidl_fuchsia_metrics::{MetricEvent, MetricEventPayload}, fidl_fuchsia_wlan_sme as fidl_sme, fidl_fuchsia_wlan_stats::MlmeStats, fuchsia_async as fasync, fuchsia_inspect:...
the_stack
mod __gl_imports { pub use std::marker::Send; pub use std::mem; pub use std::os::raw; } pub mod types { #![allow( non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations )] // Common types from OpenGL 1.1 pub type GLenum = super::__gl_i...
the_stack
#[cfg(not(test))] extern crate alloc; #[cfg(not(test))] use alloc::vec::Vec; use r_efi::efi; #[derive(Debug)] struct Descriptor { name: Vec<u16>, guid: efi::Guid, attr: u32, data: Vec<u8>, } impl Descriptor { const fn new() -> Self { Self { name: Vec::new(), guid:...
the_stack
use core::usize; use alloc::collections::linked_list::LinkedList; use alloc::string::{String, ToString}; use num_bigint::BigInt; use num_traits::Zero; use super::Pos; #[derive(Debug)] pub struct SyntaxErr { pub pos: Pos, pub msg: &'static str, } pub struct Parser<'a> { pos: Pos, remain: &'a str, } ...
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::ffi::CString; use std::ptr; use bevy_ecs::prelude::World; use bevy_input::mouse::MouseButton; use bevy_input::Input; use glutin::{window::Window, ContextWrapper, PossiblyCurrent}; use crate::asset_libraries::{ shader_library::AssetShaderLibrary, vao_library::AssetVAOLibrary, Handle, }; use crate::geome...
the_stack
use std::collections::HashMap; use std::env; use std::ffi::OsStr; use std::fs; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use anyhow::{anyhow, Result}; use lazy_static::lazy_static; use secrecy::SecretString; use serde::{de, Deserialize, Serialize}; use crate::kbs2::backend::{Backend, RageLib...
the_stack
#![macro_use] use crate::{ beta::{Beta, ExportBeta}, form::Form, name::*, util::mbe::EnvMBE, }; use std::{fmt, iter, rc::Rc}; // TODO: This really ought to be an `Rc` around an `enum` #[derive(Clone, PartialEq)] pub enum AstContents { Trivial, /// Typically, a binder Atom(Name), Variab...
the_stack
use crate::components::comparisons::{render_lighthouse_score, Comparison}; use crate::components::container::{Container, ContainerProps}; use crate::components::info_svg::INFO_SVG; use perseus::{t, ErrorCause, GenericErrorWithCause, Html, RenderFnResultWithCause, Template}; use serde::{Deserialize, Serialize}; use std:...
the_stack
use crate::{ error::CompileError, semantic_analysis::{ declaration::ProjectionKind, TypedAstNode, TypedAstNodeContent, TypedExpression, TypedExpressionVariant, TypedStructExpressionField, }, }; use super::types::*; use sway_ir::{ constant::{Constant, ConstantValue}, context::Contex...
the_stack
use super::*; use rand::{distributions::Distribution, prelude::SliceRandom, Rng}; use std::iter::repeat; use std::sync::Arc; // A distribution of boolean terms with some size. // All subterms are booleans. pub(crate) struct PureBoolDist(pub usize); // A distribution of n usizes that sum to this value. // (n, sum) pub...
the_stack
use crate::Align; use crate::Buildable; use crate::Container; use crate::Orientable; use crate::Orientation; use crate::Widget; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::ToValue; use std::boxed...
the_stack
#[macro_use] extern crate log; #[macro_use] extern crate serde_derive; #[macro_use] extern crate lazy_static; mod database; mod group; mod groups; mod image; mod stats; mod thumbnailer; mod vec; mod view; use crate::groups::Groups; use crate::stats::ScopedDuration; use boolinator::Boolinator; use clap::Arg; use pisto...
the_stack
use dat; use ecs::resource::{OccupiedTiles, Terrain}; use identifier::{TerrainId, UnitTerrainRestrictionId}; use std::cmp; use std::cmp::Ordering; use std::collections::BinaryHeap; use std::collections::HashSet; use types::{Fixed, ToFixed, Vector3}; const PASSABILITY_THRESHOLD: f32 = 0.999; pub type PathNode = Vector...
the_stack
use std::collections::HashMap; use std::net::SocketAddr; use std::time::Duration; use slog::{debug, info, warn, Logger}; use tezedge_actor_system::{actor::*, system::Timer}; use crypto::hash::ChainId; use networking::network_channel::{NetworkChannelMsg, NetworkChannelRef, PeerMessageReceived}; use shell::shell_channe...
the_stack
#![allow(non_camel_case_types, dead_code, unused_variables, improper_ctypes, non_upper_case_globals)] // use std::fmt::{Display, Formatter, Result}; use libc::{c_void, size_t, c_char, c_uchar, intptr_t}; pub type cl_platform_id = *mut c_void; pub type cl_device_id = *mut c_void; pub type cl_context ...
the_stack
extern crate bitfield; // We use a constant to make sure bits positions don't need to be literals but // can also be constants or expressions. const THREE: usize = 3; #[derive(Copy, Clone, Debug)] pub struct Foo(u16); impl From<u8> for Foo { fn from(value: u8) -> Foo { Foo(u16::from(value)) } } bitfi...
the_stack
use std::{ cmp, collections::{BTreeMap, VecDeque}, mem, ops::{Index, IndexMut}, time::{Duration, Instant}, }; use fxhash::FxHashSet; use super::assembler::Assembler; use crate::{ crypto, crypto::Keys, frame, packet::SpaceId, range_set::ArrayRangeSet, shared::IssuedCid, StreamId, VarInt, };...
the_stack
use crate::core::geometry::{Point2f, Point2i}; use crate::core::lowdiscrepancy::C_MAX_MIN_DIST; use crate::core::lowdiscrepancy::{sample_generator_matrix, sobol_2d, van_der_corput}; use crate::core::paramset::ParamSet; use crate::core::pbrt::Float; use crate::core::pbrt::{is_power_of_2, log_2_int_i64, round_up_pow2_32,...
the_stack
mod read_dir; use std::cmp::min; use std::collections::{btree_map, BTreeMap}; use std::ffi::{CStr, CString}; use std::fs::File; use std::io::{self, Cursor, Read, Write}; use std::mem::{self, MaybeUninit}; use std::ops::Deref; use std::os::unix::ffi::OsStrExt; use std::os::unix::fs::FileExt; use std::os::unix::io::{AsR...
the_stack
use std::{collections::vec_deque::VecDeque, io, time::Duration}; #[cfg(unix)] use super::source::unix::UnixInternalEventSource; #[cfg(windows)] use super::source::windows::WindowsEventSource; #[cfg(feature = "event-stream")] use super::sys::Waker; use super::{filter::Filter, source::EventSource, timeout::PollTimeout, ...
the_stack
use cosmwasm_bignumber::Uint256; use cosmwasm_std::{ attr, from_binary, to_binary, Api, Attribute, BankMsg, Coin, ContractResult, CosmosMsg, Decimal, Reply, Response, SubMsg, SubMsgExecutionResponse, Uint128, WasmMsg, }; use crate::contract::{ execute, instantiate, query, reply, CLAIM_REWARDS_OPERATION, SW...
the_stack
use crate::core::compiler::BuildContext; use crate::core::{Dependency, PackageId, Workspace}; use crate::sources::SourceConfigMap; use crate::util::{iter_join, CargoResult, Config}; use anyhow::{bail, format_err, Context}; use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}...
the_stack
//! Implementation of the the `Encoder` struct, which is responsible for translation between the //! virtio protocols and LibVDA APIs. pub mod backend; mod encoder; use base::{error, info, warn, Tube, WaitContext}; use std::collections::{BTreeMap, BTreeSet}; use vm_memory::GuestMemory; use crate::virtio::video::asyn...
the_stack
pub(crate) mod date_histogram; pub(crate) mod stats; pub(crate) mod terms; use self::{ date_histogram::DateHistogramAggregation, stats::{ AvgAggregation, MaxAggregation, SumAggregation, }, terms::TermAggregation, }; use std::{ collections::{ hash_map::Iter, H...
the_stack
use std::{fmt, hash}; use bitcoin; use bitcoin::blockdata::constants::MAX_BLOCK_WEIGHT; use miniscript::limits::{ MAX_OPS_PER_SCRIPT, MAX_PUBKEYS_PER_MULTISIG, MAX_SCRIPTSIG_SIZE, MAX_SCRIPT_ELEMENT_SIZE, MAX_SCRIPT_SIZE, MAX_STACK_SIZE, MAX_STANDARD_P2WSH_SCRIPT_SIZE, MAX_STANDARD_P2WSH_STACK_ITEMS, }; us...
the_stack
use std::{ collections::{BTreeMap, BTreeSet}, num::NonZeroU32, sync::Arc, task::{Poll, Waker}, }; use async_trait::async_trait; use futures::{stream, FutureExt, StreamExt}; use parking_lot::Mutex; use data_types::database_rules::WriteBufferCreationConfig; use data_types::sequence::Sequence; use entry:...
the_stack
use super::{Reference, ReportResult, TargetReport}; use crate::{ annotation::{AnnotationLevel, AnnotationType}, sourcemap::Str, }; use rayon::prelude::*; use std::{ collections::{BTreeMap, BTreeSet, HashMap}, fs::File, io::{BufWriter, Cursor, Error, Write}, path::Path, }; macro_rules! writer { ...
the_stack
use std::fmt; use std::ops; use std::mem; use std::borrow::Cow; use std::result; use std::collections::{hash_map, HashMap}; use kailua_env::{Spanned, WithLoc}; use kailua_syntax::{Str, Name}; use kailua_syntax::ast::{K, Kind, SlotKind}; use kailua_diag::{Result, Reporter}; use diag::{Origin, TypeReport, TypeResult, Ty...
the_stack
mod echo_reply; mod echo_request; mod redirect; mod time_exceeded; pub use self::echo_reply::*; pub use self::echo_request::*; pub use self::redirect::*; pub use self::time_exceeded::*; pub use capsule_macros::Icmpv4Packet; use crate::packets::ip::v4::Ipv4; use crate::packets::ip::ProtocolNumbers; use crate::packets:...
the_stack
use crocksdb_ffi::{self, DBIOStatsContext, DBPerfContext, DBPerfFlags}; use std::{ iter::Sum, ops::{Add, AddAssign, BitOr, BitOrAssign}, ptr::NonNull, }; #[derive(Copy, Clone, Debug, PartialEq)] pub enum PerfLevel { Uninitialized, Disable, EnableCount, EnableTimeExceptForMutex, EnableT...
the_stack
use std::sync::mpsc::{RecvError, RecvTimeoutError, TryRecvError}; use std::sync::mpsc::{SendError, TrySendError}; use std::thread::JoinHandle; use std::time::Duration; use crossbeam_channel as cc; pub struct Sender<T> { pub inner: cc::Sender<T>, } impl<T> Sender<T> { pub fn send(&self, t: T) -> Result<(), Se...
the_stack