text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use super::*; use crossbeam_queue::ArrayQueue; use log::log; use packet::{PacketPool, PktsHeap}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use std::thread; const NUM_PKTS: usize = 10; const NUM_PART: usize = 20; const PARTICLE_SZ: usize = 256; fn packet_pool(test: &str) -> (Box<dyn PacketPoo...
the_stack
use error::Error; use pref::PRef; use datafile::{DataFile, EnvelopeIterator}; use tablefile::{TableFile, FIRST_PAGE_HEAD, BUCKETS_FIRST_PAGE, BUCKETS_PER_PAGE, BUCKET_SIZE}; use logfile::LogFile; use page::PAGE_SIZE; use pagedfile::PagedFile; use format::{Link, Payload, Envelope}; use page::Page; use bitcoin_hashes::s...
the_stack
use std::iter::Peekable; use std::str::Chars; /// The Tokenizer type. See the module-level documentation. #[derive(Clone, Debug)] pub struct Tokenizer<'a> { // The string being parsed. input: &'a str, // The starting index of the next character. index: usize, // The iterator used to extract char...
the_stack
use ctypes::{c_float, c_int, c_void}; use shared::d3d9types::D3DMATRIX; use shared::dcomptypes::{ DCOMPOSITION_BACKFACE_VISIBILITY, DCOMPOSITION_BITMAP_INTERPOLATION_MODE, DCOMPOSITION_BORDER_MODE, DCOMPOSITION_COMPOSITE_MODE, DCOMPOSITION_DEPTH_MODE, DCOMPOSITION_FRAME_STATISTICS, DCOMPOSITION_OPACITY_MODE...
the_stack
use crate::error::Error; /// A singleton object representing the AES-128-GCM AEAD scheme pub(crate) const AES128GCM_IMPL: AeadScheme = AeadScheme(&Aes128Gcm); /// Size of opening / sealing keys, in bytes const AES_128_GCM_KEY_SIZE: usize = 128 / 8; /// Size of tag, in bytes const AES_128_GCM_TAG_SIZE: usize = 128 / 8...
the_stack
use std::marker::PhantomData; use anyhow::Result; use crate::algorithms::queues::AutoQueue; use crate::algorithms::tr_filters::{AnyTrFilter, TrFilter}; use crate::algorithms::Queue; use crate::fst_impls::VectorFst; use crate::fst_traits::{ExpandedFst, MutableFst}; use crate::semirings::{ReverseBack, Semiring, Semirin...
the_stack
use codespan::{ByteOffset, ByteSpan}; use codespan_reporting::{Diagnostic, Label as DiagnosticLabel}; use im::HashMap; use moniker::{Binder, Embed, FreeVar, Nest, Scope, Var}; use crate::syntax::concrete; use crate::syntax::raw; use crate::syntax::{Label, Level}; /// The environment used when desugaring from the conc...
the_stack
extern crate clap; #[cfg(target_os = "macos")] use anyhow::format_err; use anyhow::{Context, Error, Result}; use chrono::prelude::*; use clap::{App, AppSettings, Arg, ArgMatches, SubCommand}; use rand::distributions::Alphanumeric; use rand::Rng; use rbspy::recorder; use rbspy::report; use rbspy::{OutputFormat, Pid}; u...
the_stack
use codespan_reporting::term::{emit, termcolor::NoColor, Config}; use g_code::parse::{into_diagnostic, snippet_parser}; use gloo_timers::callback::Timeout; use paste::paste; use yew::prelude::*; use yewdux_functional::use_store; use yewdux_input::*; use crate::{ state::{AppState, AppStore, FormStore}, ui::{For...
the_stack
use crate::ability::{AbilitiesSeed, Ability, AbilityId}; use crate::actor::{Actor, ActorRules}; use crate::battle::{Battle, BattleRules, Checkpoint}; use crate::character::{Character, CharacterRules, Statistic, StatisticId, StatisticsSeed}; use crate::entity::{Entity, EntityId, Transmutation}; use crate::error::{Weasel...
the_stack
use crate::errors::EstimatorErr; use crate::math::CSRArray; use crate::tokenize::Tokenizer; use hashbrown::{HashMap, HashSet}; use itertools::sorted; use ndarray::Array; #[cfg(feature = "rayon")] use rayon::prelude::*; use sprs::CsMat; #[cfg(feature = "rayon")] use std::cmp; #[cfg(test)] mod tests; /// Sort features...
the_stack
use std::collections::HashSet; use std::fs::File; use std::fs::Permissions; use std::io::ErrorKind; use std::os::unix::fs::PermissionsExt; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; use std::sync::RwLock; use std::time::Duration; use tempfile::TempDir; use tracing::instrument; use tracing::Level; ...
the_stack
use crate::{ error::SwapError, instruction::{AdminInstruction, RampAData}, processor::utils, state::SwapInfo, }; use solana_program::{ account_info::{next_account_info, AccountInfo}, entrypoint::ProgramResult, msg, program_pack::Pack, pubkey::Pubkey, sysvar::{clock::Clock, Sysvar...
the_stack
//! Utilities for handling the Mac OS Roman character set. /// Returns `true` if the supplied `char` exists in the Mac OS Roman character encoding. /// /// <https://en.wikipedia.org/wiki/Mac_OS_Roman> pub fn is_macroman(chr: char) -> bool { char_to_macroman(chr).is_some() } /// Converts a `char` to its Mac OS Ro...
the_stack
use super::{ buffer::{mutate_buffer_blob, mutate_buffer_filename, mutate_buffer_string}, foreach_call_arg, foreach_call_arg_mut, foreach_value, group::{mutate_array, mutate_struct, mutate_union}, int::{mutate_const, mutate_csum, mutate_flags, mutate_int, mutate_len, mutate_proc}, ptr::{mutate_ptr, m...
the_stack
use alloc::string::String; use core::mem::ManuallyDrop; use core::ops::Deref; use crate::{ FlexStr, HeapStr, LocalStr, SharedStr, StorageType, PTR_SIZED_PAD, STRING_SIZED_INLINE, }; // *** Repeat custom trait *** /// Trait that can repeat a given [FlexStr] "n" times efficiently pub trait Repeat<const SIZE: usize...
the_stack
pub use crate::blockmode::{ Aes128Ccm, Aes128Ccm8, Aes128CcmShort, Aes128CcmShort12, Aes128CcmShort8, Aes128Gcm, Aes128Gcm12, Aes128Gcm8, Aes128GcmSiv, Aes128OcbTag128, Aes128OcbTag64, Aes128OcbTag96, Aes192OcbTag128, Aes192OcbTag64, Aes192OcbTag96, Aes256...
the_stack
extern crate flexo; use std::{fs, str}; use std::cmp::Ordering; use std::fs::File; use std::fs::OpenOptions; use std::io::BufWriter; use std::io::{ErrorKind, Read, Write}; use std::num::ParseIntError; use std::path::{Path, PathBuf}; use std::string::FromUtf8Error; use std::time::Duration; use std::os::unix::ffi::OsStr...
the_stack
// todo: WB and WL should support pwm features use core::ops::Deref; use num_traits::float::Float; use cortex_m::interrupt::free; #[cfg(feature = "embedded-hal")] use embedded_hal::{ blocking::delay::{DelayMs, DelayUs}, timer::{CountDown, Periodic}, }; #[cfg(feature = "embedded-hal")] use void::Void; // t...
the_stack
use std::collections::HashSet; use crate::error::msg::SemError; use crate::semck::{self, AllowSelf, TypeParamContext}; use crate::sym::{NestedSymTable, Sym}; use crate::ty::SourceType; use crate::vm::{self, Fct, FctId, FctParent, TypeParamId, VM}; pub fn check(vm: &VM) { for fct in vm.fcts.iter() { let mu...
the_stack
use crate::coroutine::FiberHandle; use crate::parse::codegen::{ContextKind, ExceptionType}; use crate::*; use fancy_regex::Captures; #[cfg(feature = "perf")] use super::perf::*; use std::path::PathBuf; use vm_inst::*; mod constants; mod fiber; mod loader; mod method; mod ops; mod opt_core; pub type ValueTable = FxHas...
the_stack
use *; use fnv::FnvHashMap as HashMap; /// Used to store temporary values of shared functions to speed up computation. /// By default, all function outputs that are referenced more than once are cached. /// To signal that some function output should be cached, `None` is stored in a hash map. /// When performing the f...
the_stack
use std::str::FromStr as _; use anyhow::{anyhow, Result}; use http::header::{HeaderMap, HeaderName, HeaderValue}; use oasis_types::{Address, RpcError}; use uuid::Uuid; #[cfg(not(target_env = "sgx"))] use reqwest::Client; use crate::api::*; pub trait Gateway { /// Deploys a new service with the provided initcode...
the_stack
use crate::common_utils::common::{read_json_from_vmo, write_json_to_vmo}; use crate::server::constants::CONCURRENT_REQ_LIMIT; use crate::server::Facade; use anyhow::Error; use async_trait::async_trait; use fidl_fuchsia_testing_sl4f::{ FacadeIteratorRequest, FacadeProviderRequest, FacadeProviderRequestStream, }; use...
the_stack
use crate::{ casing::Casing, functions::{Function, FunctionList}, prelude::Primitive, types::{CustomType, Enum, EnumOptions, Field, Struct, Type, TypeIdent, TypeMap, Variant}, TsExtendedRuntimeConfig, }; use inflector::Inflector; use std::{fs, str::FromStr}; pub(crate) fn generate_bindings( imp...
the_stack
use mio::{Poll, PollOpt, Ready, Token}; use mio::tcp::Shutdown; use pnet::packet::Packet; use pnet::packet::tcp::TcpPacket; use std::io; use std::io::{Error, ErrorKind}; use std::os::unix::io::FromRawFd; use std::os::raw::c_void; use stream_traits::{BufferableSender, StreamReceiver, RawWriteStat, R...
the_stack
// Executed Command: // target/release/interbtc-standalone // benchmark // --chain // dev // --execution=wasm // --wasm-execution=compiled // --pallet // vault-registry // --extrinsic // * // --steps // 100 // --repeat // 10 // --output // crates/vault-registry/src/default_weights.rs // --template // .deploy/weight-tem...
the_stack
use crate::sections::layer_and_mask_information_section::layer::BlendMode; // Multiplies the pixel's current alpha by the passed in `opacity` pub(crate) fn apply_opacity(pixel: &mut [u8; 4], opacity: u8) { let alpha = opacity as f32 / 255.; pixel[3] = (pixel[3] as f32 * alpha) as u8; } /// /// https://www.w3....
the_stack
mod compile; mod convert; mod droppable_value; mod value; use std::{ ffi::CString, os::raw::{c_int, c_void}, sync::Mutex, }; use libquickjs_sys as q; use crate::{ callback::{Arguments, Callback}, console::ConsoleBackend, ContextError, ExecutionError, JsValue, ValueError, }; use value::{JsFun...
the_stack
use std::cell::RefCell; use std::collections::{BTreeMap, HashSet}; use std::os::unix::io::RawFd; use std::rc::Rc; use std::str; use zellij_utils::pane_size::Size; use zellij_utils::{input::layout::Layout, position::Position, zellij_tile}; use crate::{ panes::PaneId, pty::{ClientOrTabIndex, PtyInstruction, Vte...
the_stack
use std::{ any::{Any, TypeId}, cell::Cell, cmp::Ordering, collections::{hash_map::Entry, HashMap, HashSet, VecDeque}, fmt, hash::{Hash, Hasher}, marker::PhantomData, mem, ops::{Deref, DerefMut}, ptr::{self, NonNull}, rc::Rc, result::Result as StdResult, sync::{self, A...
the_stack
use std::convert::TryFrom; use std::num::NonZeroU16; use std::error::Error; use std::fmt; use std::str::FromStr; /// An HTTP status code (`status-code` in RFC 7230 et al.). /// /// Constants are provided for known status codes, including those in the IANA /// [HTTP Status Code Registry]( /// https://www.iana.org/assig...
the_stack
#![forbid(unsafe_code)] use crate::{network::StorageServiceNetworkEvents, StorageReader, StorageServiceServer}; use anyhow::{format_err, Result}; use aptos_config::config::StorageServiceConfig; use aptos_crypto::{ed25519::Ed25519PrivateKey, HashValue, PrivateKey, SigningKey, Uniform}; use aptos_logger::Level; use apto...
the_stack
use super::arm7tdmi::memory::{MemoryAccess, MemoryInterface}; use super::cartridge::BackupMedia; use super::interrupt::{self, Interrupt, InterruptConnect, SharedInterruptFlags}; use super::iodev::consts::{REG_FIFO_A, REG_FIFO_B}; use super::sched::{EventType, Scheduler, SchedulerConnect, SharedScheduler}; use super::sy...
the_stack
//! Raw FFI bgfx bindings. #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] extern crate libc; pub type size_t = ::libc::size_t; pub type int32_t = i32; pub type uint8_t = u8; pub type uint16_t = u16; pub type uint32_t = u32; pub type uint64_t = u64; include!("ffi_bgfx...
the_stack
use std::mem::size_of; use arrow::array::PrimitiveArray; use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; use rand::prelude::*; use arrow::datatypes::*; use read_buffer::benchmarks::{ByteTrimmer, Fixed, FixedNull, NoOpTranscoder, ScalarEncoding}; const ROWS: [usize; 5] = [10, 10...
the_stack
use util; use {ArgsIter, MesaError, Result, UtilSetup, UtilWrite}; use clap::{AppSettings, Arg, ArgGroup, OsValues}; use std::ffi::{OsStr, OsString}; use std::fs; use std::io::{self, Write}; use std::os::unix::fs::{MetadataExt, PermissionsExt}; use std::path::{Path, PathBuf}; use std::result::Result as StdResult; use ...
the_stack
use std::collections::HashMap; use std::ffi::CString; use std::fs::File; use std::io::Read; use std::ptr; use std::str; use gl; use gl::types::*; use cgmath::{Matrix, Matrix4, Vector3, Vector4}; use cgmath::prelude::*; use bitflags::bitflags; use log::{warn, trace}; pub struct Shader { pub id: u32, uniform_...
the_stack
use std::cell::{Cell, RefCell}; use std::fmt; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::mpsc::{channel, Receiver, Sender}; use std::sync::Arc; use enum_map::{enum_map, Enum, EnumMap}; use sharded_slab::pool::{OwnedRef, OwnedRefMut}; use super::{perform, CompletedIo, Executor, Item}; use crate::ut...
the_stack
use super::{ Config, Configure, DecodeError, FieldLocator, FieldLocatorContext, RawDecoder, RawDecoderBuffered, RawFrame, }; use crate::dict::IsFieldDefinition; use crate::{ dict::FixDatatype, Dictionary, FixValue, GetConfig, RandomFieldAccess, RepeatingGroup, TagU16, }; use nohash_hasher::IntMap; use std::...
the_stack
use crate::{ builtins::{array, object::Object}, object::{InternalObjectMethods, JsObject, JsPrototype}, property::{PropertyDescriptor, PropertyKey}, value::Type, Context, JsResult, JsValue, }; use rustc_hash::FxHashSet; /// Definitions of the internal object methods for array exotic objects. /// //...
the_stack
use register::Register; use audio::Audio; /* * Audio Processing Unit implementation. Consists of * - Pulse 1/2 channel * - Triangle channel * - Noise channel * - DMC channel * Refer to https://wiki.nesdev.com/w/index.php/APU */ pub struct Apu { cycle: u32, step: u16, // CPU memory map...
the_stack
use std::{cmp::Ordering, collections::BinaryHeap, marker::PhantomData}; use super::CpuLocation; #[derive(Debug, Clone, Eq, PartialEq)] pub enum Level { SystemRoot, Cpu(usize), Core(usize), Package(usize), NumaNode(usize), } /// `Node`s are connected to build a tree. The `children` of each `Node`...
the_stack
use std; use std::hash::Hasher; use std::ascii::AsciiExt; use std::error::Error as StdError; use std::collections::hash_map::DefaultHasher; use bytes::{Bytes, BytesMut}; use tokio_io::codec::Decoder; use http::headers::{Header, WriteHeaders}; use http::message::{Version, ContentCompression, ConnectionType, Request, Re...
the_stack
//! A Ceed QFunction represents the spatial terms of the point-wise functions //! describing the physics at the quadrature points. use std::pin::Pin; use crate::prelude::*; pub type QFunctionInputs<'a> = [&'a [crate::Scalar]; MAX_QFUNCTION_FIELDS]; pub type QFunctionOutputs<'a> = [&'a mut [crate::Scalar]; MAX_QFUNCT...
the_stack
use core::mem; use crate::xxh32_common as xxh32; use crate::xxh64_common as xxh64; use crate::xxh3_common::*; const INITIAL_ACC: [u64; ACC_NB] = [ xxh32::PRIME_3 as u64, xxh64::PRIME_1, xxh64::PRIME_2, xxh64::PRIME_3, xxh64::PRIME_4, xxh32::PRIME_2 as u64, xxh64::PRIME_5, xxh32::PRIME_1 as u64 ]; #[inline(al...
the_stack
use super::DescriptorSetArc; use super::DescriptorSetElementKey; use super::DescriptorSetWriteSet; use crate::resources::descriptor_sets::descriptor_write_set::{ DescriptorSetWriteElementBufferData, DescriptorSetWriteElementImageValue, }; use crate::resources::descriptor_sets::{ DescriptorSetAllocator, Descript...
the_stack
use std::ops; use super::super::error::TypeError; use super::Chunk; use super::Instr; use super::LuaType; use super::Result; use super::State; use super::Val; /// A `Frame` represents a single stack-frame of a Lua function. #[derive(Default)] pub(super) struct Frame { /// The chunk being executed chunk: Chunk...
the_stack
use super::filetree::{ FileTreeItem, FileTreeItemKind, FileTreeItems, PathCollapsed, }; use anyhow::Result; use asyncgit::StatusItem; use std::{cmp, collections::BTreeSet}; //TODO: use new `filetreelist` crate /// #[derive(Default)] pub struct StatusTree { pub tree: FileTreeItems, pub selection: Option<usize>, /...
the_stack
use crate::regex::{div, element, element_class_id, html_attribute, ruby_attribute}; use regex::{Captures, Regex}; use std::collections::{BTreeSet, HashMap}; #[derive(Debug, PartialEq, Clone)] pub enum ElementType { Div(), Other(), } #[derive(Clone, Debug, PartialEq)] pub struct Element { pub whitespace: u...
the_stack
use std::collections::{HashMap, HashSet}; use std::fs::{create_dir_all, remove_file, File}; use std::path::{Path, PathBuf}; use std::sync::Arc; use atomic_refcell::AtomicRefCell; use itertools::Itertools; use log::debug; use crate::entry::entry_point::{OperationError, OperationResult}; use crate::id_tracker::IdTracke...
the_stack
use crate::{Event, EventId, EventIdGenerator, OpMeta}; use beef::Cow; use std::borrow::Cow as SCow; use tremor_common::stry; use tremor_script::{ self, ast::{AggrSlice, Aggregates, Consts, RunConsts, Select, WindowDefinition}, errors::Result, interpreter::{Env, LocalStack}, prelude::*, Value, NO...
the_stack
use std::collections::BTreeMap; use std::path::PathBuf; use std::fs::File; use std::io::BufReader; use std::str::FromStr; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde_json; use super::regex::Regex; use super::scope::{MatchPower, Scope}; use super::super::LoadingError; use super::super::hig...
the_stack
use std::cmp; use std::str::FromStr; use prettytable::Row; use regex::Regex; /// Two sets of benchmarks that are comparable but haven't been paired up yet. #[derive(Clone, Debug)] pub struct Benchmarks { old: Vec<Benchmark>, new: Vec<Benchmark>, } impl Benchmarks { /// Create a new empty set of comparabl...
the_stack
pub const PAGE_SIZE: usize = 0x1000; pub type PAddr = u64; pub type VAddr = usize; pub mod addresses { pub const USER_END: usize = 0x00000040_00000000; /// Start of the kernel heap pub const HEAP_START: usize = 0xFFFFFFC0_00000000; /// End of the kernel heap pub const HEAP_END: usize = 0xFFFFFFD...
the_stack
use crate::cache::ValidatorCache; use crate::node_status_api::models::{GatewayStatusReport, MixnodeStatusReport, Uptime}; use crate::node_status_api::ONE_DAY; use crate::nymd_client::Client; use crate::rewarding::epoch::Epoch; use crate::rewarding::error::RewardingError; use crate::storage::models::{ FailedGatewayR...
the_stack
use crate::prelude::*; use super::RelativePosition; use super::GLYPH_WIDTH; use super::HORIZONTAL_MARGIN; use super::TEXT_SIZE; use crate::component::breadcrumbs; use crate::component::breadcrumbs::project_name::LINE_HEIGHT; use crate::MethodPointer; use enso_frp as frp; use ensogl::application::Application; use enso...
the_stack
use crate::build_solidity; use parity_scale_codec::Encode; use parity_scale_codec_derive::Decode; #[test] fn various_constants() { #[derive(Debug, PartialEq, Encode, Decode)] struct FooReturn(u32); #[derive(Debug, PartialEq, Encode, Decode)] struct Foo64Return(i64); // parse let mut runtime = ...
the_stack
#![allow(non_camel_case_types,non_snake_case)] // follows C naming conventions #![allow(dead_code)] // API, may not be used use core::fmt; use Void; pub type ACPI_SIZE = usize; pub type ACPI_PHYSICAL_ADDRESS = ::memory::PAddr; pub type ACPI_IO_ADDRESS = u16; pub type ACPI_PCI_ID = u32; pub type ACPI_CPU_FLAGS = u32...
the_stack
#![deny(missing_docs)] use aes_gcm::aead::generic_array::GenericArray; use aes_gcm::aead::{AeadInPlace, NewAead}; use aes_gcm::Aes128Gcm; use bytes::{Buf, BufMut, Bytes, BytesMut}; use hkdf::Hkdf; use hpke::aead::{AeadTag, AesGcm128}; use hpke::kdf::{HkdfSha256, Kdf as KdfTrait}; use hpke::kem::X25519HkdfSha256; use h...
the_stack
use std::sync::atomic::{AtomicUsize, Ordering}; use std::borrow::Borrow; use futures::task::{self, Task}; use futures::{StartSend, AsyncSink, Async, Sink, Stream, Poll}; use handle::{Handle, IdHandle, ResizingHandle, BoundedHandle, HandleInner, Like}; use primitives::atomic_ext::AtomicExt; use primitives::index_alloca...
the_stack
use std::{ collections::{ hash_map::{Iter, Values}, HashMap, }, fmt::{Display, Formatter}, }; use crate::{ datastore::error::{Error, Result}, hash_types::state::AgentStateField, simulation::package::name::PackageName, }; pub mod accessor; pub mod built_in; pub mod creator; pub ...
the_stack
use std::{ path::{Path, PathBuf}, str::FromStr, }; use failure::{format_err, Error, ResultExt}; use ignore::gitignore::GitignoreBuilder; use indexmap::IndexMap; use semver::Version; use semver_constraints::Constraint; use serde::Deserialize; use toml; use url::Url; use walkdir::{DirEntry, WalkDir}; use super:...
the_stack
use crate::linux::virtqueue::*; use crate::vm::VirtualCPU; use log::info; use mac_address::*; use std::fmt; use std::mem::size_of; use std::ptr::copy_nonoverlapping; use std::sync::Mutex; use std::vec::Vec; use tun_tap::*; use virtio_bindings::bindings::virtio_net::*; const STATUS_ACKNOWLEDGE: u8 = 0b00000001; const S...
the_stack
use chrono::{DateTime, TimeZone, Utc}; use nettu_scheduler_domain::providers::google::*; use nettu_scheduler_domain::CalendarEvent; use reqwest::Client; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use tracing::error; #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pu...
the_stack
use std::{ sync::Arc, time::{Duration, Instant}, }; use sync::Mutex; use super::{Event, EventReadResult, FakeClock, RawDescriptor, Result}; use crate::descriptor::{AsRawDescriptor, FromRawDescriptor, IntoRawDescriptor, SafeDescriptor}; pub struct Timer { pub(crate) handle: SafeDescriptor, pub(crate) i...
the_stack
use crate::prelude::*; use crate::entry; use crate::entry::Entry; use ensogl_core::application::Application; use ensogl_core::display; use ensogl_core::display::scene::layer::Layer; use ensogl_core::display::scene::layer::WeakLayer; use ensogl_core::display::style; // ====================== // === DisplayedEntry =...
the_stack
pub mod grid; pub mod level; #[cfg(test)] pub mod string_util; use std::fmt; use serde::{Deserialize, Serialize}; use crate::exec::BlipDieMode; use crate::util::vec_option::VecOption; use grid::{Axis3, Dir3, DirMap3, Grid3, Point3, Sign, Vector3}; pub use level::Level; #[derive(PartialEq, Eq, PartialOrd, Ord, Cop...
the_stack
use codespan::{ByteIndex, ByteOffset, ByteSpan, FileMap, RawOffset}; use codespan_reporting::{Diagnostic, Label}; use std::fmt; use std::str::CharIndices; use unicode_xid::UnicodeXID; fn is_symbol(ch: char) -> bool { match ch { '&' | '!' | ':' | ',' | '.' | '=' | '/' | '>' | '<' | '-' | '|' | '+' | ';' | '...
the_stack
use crate::map::SgMap; use crate::tree::{ Idx, IntoIter as TreeIntoIter, Iter as TreeIter, IterMut as TreeIterMut, SmallNode, }; // General Iterators --------------------------------------------------------------------------------------------------- /// An iterator over the entries of a [`SgMap`][crate::map::SgMa...
the_stack
use crate::{HashReader, MerkleAccumulator, MerkleAccumulatorView}; use anyhow::{ensure, format_err, Result}; use aptos_crypto::hash::{HashValue, TestOnlyHasher, ACCUMULATOR_PLACEHOLDER_HASH}; use aptos_types::proof::{definition::LeafCount, position::Position}; use proptest::{collection::vec, prelude::*}; use std::colle...
the_stack
use crate::{ buf::RequestBuffer, channel::Channel, pool::{Pool, PoolEntry}, }; use futures::{ future::{Future, FutureExt}, io::AsyncReadExt, select, }; use libc::c_int; use polyfuse::{io::unite, Filesystem, Session, SessionInitializer}; use std::{ffi::OsStr, io, path::Path, sync::Arc}; use tokio...
the_stack
//! Codec support via `libavcodec` from FFmpeg. use audiodecoder; use codecs::h264; use pixelformat::PixelFormat; use timing::Timestamp; use videodecoder; use libc::{c_double, c_int, c_uint, c_void}; use std::any::Any; use std::ffi::CString; use std::i32; use std::mem; use std::marker::PhantomData; use std::ptr; use ...
the_stack
use parking_lot::Mutex; use std::collections::VecDeque; use std::convert::TryInto; use std::sync::Arc; use crate::errno; use crate::error; use crate::fd_impl_nonseekable; use crate::fs::*; use crate::mm::PAGE_SIZE; use crate::signals::{signal_handling::send_checked_signal, *}; use crate::syscalls::*; use crate::task::...
the_stack
pub mod upload; use crate::prelude::*; use enso_shapely::shared; use enum_dispatch::*; use upload::UniformUpload; use web_sys::WebGlUniformLocation; use crate::system::gpu::data::prim::*; use crate::system::gpu::data::texture::*; use crate::system::gpu::shader::Context; use web_sys::WebGlTexture; // ============...
the_stack
use crate::behaviour::*; use crate::board_message::*; use crate::board_simulator::*; use crate::event::*; use crate::sounds::*; use num::FromPrimitive; use zzt_file_format::*; #[derive(Debug, Clone)] pub struct WaterBehaviour; impl Behaviour for WaterBehaviour { fn push(&self, _x: i16, _y: i16, _push_off_x: i16, _...
the_stack
use evcxr::{CommandContext, Error, EvalContext, EvalContextOutputs}; use once_cell::sync::OnceCell; use std::collections::{HashMap, HashSet}; use std::ops::{Deref, DerefMut}; use std::sync::mpsc; use std::{io, sync::Mutex}; use tempfile; #[track_caller] fn eval_and_unwrap(ctxt: &mut CommandContext, code: &str) -> Hash...
the_stack
use crate::{ platform::{Platform, Tier}, target::{Arch, Env, OS}, }; /// `aarch64-apple-darwin`: Apple Silicon macOS (11+) pub const AARCH64_APPLE_DARWIN: Platform = Platform { target_triple: "aarch64-apple-darwin", target_arch: Arch::AArch64, target_os: OS::MacOS, target_env: None, tier: T...
the_stack
use std::collections::HashMap; use specs; use super::chunk::{Cell, Chunk}; use super::chunk_pair::{ChunkPair, ChunkPairOrigins}; use super::gen::{Gen, SimpleGen}; use super::spec::Spec; use super::ChunkOrigin; use super::{origin_of_chunk_in_same_root_containing, origin_of_chunk_owning}; use crate::grid::{Point3, PosI...
the_stack
use std::{ fmt::{Debug, Display}, io::ErrorKind, ops::Deref, path::{Path, PathBuf}, time::{Duration, Instant}, }; use itertools::Itertools; use serde::{Deserialize, Serialize}; use transmog_pot::Pot; #[cfg(feature = "multiuser")] use crate::admin::{PermissionGroup, Role, User}; use crate::{ co...
the_stack
use std::fmt; use std::sync::{Arc, Condvar, Mutex, RwLock}; use classfile::{BytesRef, ClassFile}; use crate::new_br; use crate::oop::class::ClassObject; use crate::runtime::{require_class3, ClassLoader}; use crate::types::*; use crate::util::oop::{get_java_lang_integer_value_offset, get_java_lang_string_value_offset}...
the_stack
use super::{ ExpandFormatted, ExpandInto, ExpandWithFormatter, FormatArg, FormatArgs, FormatIfArgs, LocalVariable, UncheckedFormatArg, UncheckedFormatArgs, WriteArgs, }; use crate::{ format_str::{FmtArg, FmtStrComponent, FormatStr, WhichArg}, parse_utils::{LitStr, MyParse, ParseBuffer, ParseStream, Tok...
the_stack
use barrel::types; use indoc::indoc; use introspection_engine_tests::test_api::*; #[test_connector(tags(CockroachDb))] async fn negative_default_values_should_work(api: &TestApi) -> TestResult { let sql = r#" CREATE TABLE "Blog" ( id SERIAL PRIMARY KEY, int INT4 NOT...
the_stack
use std::borrow::Borrow; use std::fmt::Debug; use std::iter::Peekable; use std::marker::PhantomData; use std::sync::Arc; use anyhow::Result; use itertools::Itertools; use nom::lib::std::collections::BTreeSet; use bitflags::bitflags; use crate::algorithms::compose::matchers::{IterItemMatcher, MatchType, Matcher, Matc...
the_stack
use iota_streams_app::{ identifier::Identifier, message::{ HasLink as _, LinkGenerator, }, }; use iota_streams_core::{ err, prelude::{ ToString, Vec, }, prng, psk::{ Psk, PskId, }, try_or, unwrap_or_break, Errors::{ ...
the_stack
use ::itertools::izip; use indexmap::map::IndexMap; use itertools::Itertools; use statrs::function::erf; use crate::{base, proto, Warnable}; use crate::base::{DataType, IndexKey, NodeProperties, SensitivitySpace, Value, ValueProperties}; use crate::components::{Accuracy, Mechanism, Sensitivity}; use crate::components:...
the_stack
use super::string::JSONString; use super::JSONValue; use std::collections::HashMap; use std::hash::BuildHasher; use std::hash::Hash; use std::io; /// Write a single key-value pair fn write_object_entry<W, K, V>(w: &mut W, key: &K, value: &V) -> io::Result<()> where W: io::Write, K: JSONString, V: JSONValue...
the_stack
use bytes::{Buf, BufMut, BytesMut}; use log::{debug, error, info, trace}; use tokio::io::{AsyncReadExt, BufReader}; use tokio::net::{ tcp::{OwnedReadHalf, OwnedWriteHalf}, TcpStream, }; use crate::config::{Address, User}; use crate::constants::*; use crate::errors::Error; use crate::messages::*; use crate::scr...
the_stack
use super::{ rule::{BuiltRule, Rule}, Iptables, IptablesRule, IptablesRuleDiscriminants, PolicyOrRule, DFW_FORWARD_CHAIN, DFW_INPUT_CHAIN, DFW_POSTROUTING_CHAIN, DFW_PREROUTING_CHAIN, }; use crate::{errors::*, process::*, types::*, FirewallBackend}; use failure::{format_err, ResultExt}; use slog::{debug, in...
the_stack
use std::collections::HashMap; use std::io::Error; use std::rc::Rc; use std::slice::Iter; use sulis_core::image::Image; use sulis_core::util::invalid_data_error; use sulis_module::{ bonus::AttackKindBuilder, Actor, ImageLayer, ItemKind, ItemSaveState, ItemState, Module, QuickSlot, Slot, StatList, WeaponStyle, ...
the_stack
//**************************************************************************** // Automatically generated from yaml/swiftnav/sbp/settings.yaml // with generate.py. Please do not hand edit! //****************************************************************************/ //! Messages for reading, writing, and discovering ...
the_stack
use shlex; use std::{cell::RefCell, fs::File, io::Write, rc::Rc, time::Instant}; #[cfg(unix)] use termion::{ self, raw::{IntoRawMode, RawTerminal}, terminal_size, }; use transportation::{BufferedTransport, Notifiable, Notifies}; #[derive(Clone)] pub(crate) struct Ui { internal: Rc<UiInternal>, } #[der...
the_stack
use std::convert::TryFrom; use crate::{generated_attr, StateMachineInfo, TypestateError}; use parse::Parser; use syn::{ parse, visit_mut::VisitMut, Attribute, Error, Field, Fields, Ident, Item, ItemMod, ItemStruct, Path, }; pub(crate) const AUTOMATA_ATTR_IDENT: &str = "automaton"; pub(crate) const STATE_ATTR...
the_stack
use fasteval::{Evaler, ExpressionI, Parser, Error, Slab, EmptyNamespace, CachedCallbackNamespace}; use std::collections::BTreeMap; use std::collections::BTreeSet; fn parse_raw<'a>(s:&str, slab:&'a mut Slab) -> Result<ExpressionI,Error> { Parser::new().parse(s, &mut slab.ps) } fn ok_parse<'a>(s:&str, slab:&'a mut ...
the_stack
mod base_dir; mod cleanup; mod fetch_blocks; mod fetch_dir; mod fetch_index; mod progress; mod reconciliation; mod rpc; use std::collections::{HashMap, HashSet, BTreeMap, BTreeSet}; use std::net::SocketAddr; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::{Arc}; use s...
the_stack
use core; pub use interface::{DivansResult, DivansOutputResult, ErrMsg}; pub use alloc::{AllocatedStackMemory, Allocator, SliceWrapper, SliceWrapperMut, StackAllocator}; use brotli::dictionary::{kBrotliMaxDictionaryWordLength, kBrotliDictionary, kBrotliDictionaryOffsetsByLength}; ...
the_stack
use std::any::Any; use std::cell::RefCell; use std::rc::Rc; use sulis_core::config::Config; use sulis_core::ui::{Callback, Widget, WidgetKind}; use sulis_core::widgets::{Button, InputField, Label, Spinner}; use sulis_module::area::{LocationKind, OnRest}; use crate::AreaEditor; pub const NAME: &str = "save_window"; ...
the_stack
//! A simple compute shader example that draws into a window, based on wgpu. use std::time::Instant; use rust_gpu_toy_shared::Config; use wgpu::{Extent3d, ShaderModule}; use winit::dpi::PhysicalSize; use winit::{ event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::Window, }; use s...
the_stack
use crate::zkp::taps::{Combo, Register, RegisterGroup, Taps}; pub const RISCV_TAPS: &'static Taps = &Taps { registers: &[ Register { group: RegisterGroup::Accum, offset: 0, back: &[0, 1], combo_id: 1, }, Register { group: RegisterG...
the_stack
//! Routines for initialization of STM32F1. //! //! This module includes code for setting up the clock, flash, access time and //! performing initial peripheral configuration. //use hal::mem_init::init_data; use core::default; use self::SystemClockSource::*; use self::PllClockSource::*; use self::PllHsePrediv::*; use...
the_stack