text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use std::path::PathBuf; use std::result; use glow::Context as GlowContext; use hashbrown::HashMap; use sdl2::controller::{Axis as SdlGamepadAxis, Button as SdlGamepadButton, GameController}; use sdl2::event::{Event as SdlEvent, WindowEvent}; use sdl2::keyboard::{Keycode, Mod, Scancode}; use sdl2::mouse::{MouseButton a...
the_stack
use crate::api::*; use crate::Gam; use crate::{MsgForwarder, forwarding_thread}; pub use graphics_server::*; use xous_ipc::{String, Buffer}; use num_traits::*; use graphics_server::api::{PixelColor, TextBounds, DrawStyle}; const MAX_ITEMS: usize = 16; #[allow(dead_code)] // here until Memory types are implemented ...
the_stack
use crate::ast; use crate::lexer::token; use crate::lexer::Lexer; use crate::parser::basic::BasicParser; use crate::parser::core::*; use crate::parser::rules::*; use moore_common::errors::*; use moore_common::grind::{self, Grinder}; use moore_common::source::*; use std::fmt::Debug; macro_rules! parse { ($content:e...
the_stack
use std::mem::transmute; use super::*; type TestResult = anyhow::Result<()>; struct TibSave { stack_top: usize, stack_bottom: usize, } impl TibSave { fn new() -> TibSave { context::prepare_thread(); let mut res = TibSave { stack_top: 0, stack_bottom: 0, }; // nt will decline to call ntdll!KiUserExce...
the_stack
use crate::{ ciphersuite::Ciphersuite, config::{Config, ProtocolVersion}, credentials::{CredentialBundle, CredentialType}, framing::*, group::*, key_packages::KeyPackageBundle, messages::proposals::Proposal, schedule::{EncryptionSecret, MembershipKey, SenderDataSecret}, test_utils::*...
the_stack
extern crate bellman_vk_codegen; extern crate clap; extern crate plonkit; use clap::Clap; use std::fs::File; use std::path::Path; use std::str; use plonkit::bellman_ce::pairing::bn256::Bn256; use plonkit::circom_circuit::CircomCircuit; use plonkit::plonk; use plonkit::reader; use plonkit::recursive; /// A zkSNARK t...
the_stack
use once_cell::sync::Lazy; use std::array::IntoIter; use std::collections::HashMap; use std::convert::TryFrom; use std::fmt::{Display, Error, Formatter}; use std::iter::FromIterator; macro_rules! css_enums { ($( #[$($meta:meta),*] $pub:vis enum $name:ident { $($variant:ident = $value:li...
the_stack
use shaderc::{CompileOptions, Compiler, ShaderKind, SourceLanguage, IncludeType, ResolvedInclude, IncludeCallbackResult}; use std::path::PathBuf; use std::fs; use std::iter::once; type Result<T, E = Box<dyn std::error::Error>> = std::result::Result<T, E>; static SCALAR_TYPES: &[(&'static str, &'static str)] = &[ ...
the_stack
use crate::cx_win32::*; use crate::*; impl Cx { pub fn event_loop<F>(&mut self, mut event_handler: F) where F: FnMut(&mut Cx, &mut Event), { self.event_handler = Some(&mut event_handler as *const dyn FnMut(&mut Cx, &mut Event) as *mut dyn FnMut(&mut Cx, &mut Event)); sel...
the_stack
// Integration tests live in this file. We can't use the Rust "integration test" mode // as we don't have the expected source code structure. #[cfg(feature = "integration_tests")] #[cfg(test)] mod tests { use rand::Rng; use std::fs; use std::io::{Read, Write}; use std::net::TcpStream; use std::proc...
the_stack
use app_dirs::*; use chrono::prelude::*; use crate::error::{Error, Result}; use katatsuki::Track; // use tree_magic; use std::fs; use std::io; use std::io::ErrorKind; use std::path::{Path, PathBuf}; trait InvalidChar { fn is_invalid_for_path(&self) -> bool; } impl InvalidChar for char { fn is_invalid_for_path...
the_stack
use itertools::Itertools; use num::ToPrimitive; use std::num::NonZeroUsize; use tangram_zip::zip; /// `BinaryClassificationMetrics` computes common metrics used to evaluate binary classifiers at a number of classification thresholds. pub struct BinaryClassificationMetrics { /// This field maps thresholds to the confu...
the_stack
use crate::data::dirty::traits::*; use crate::prelude::*; use crate::data::dirty; use crate::data::OptVec; use crate::display; use crate::display::camera::Camera2d; use crate::display::scene::Scene; use crate::display::shape::system::DynShapeSystemInstance; use crate::display::shape::system::DynShapeSystemOf; use crat...
the_stack
#[allow(missing_docs)] // documentation missing in model #[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct UntagResourceOutput {} impl std::fmt::Debug for UntagResourceOutput { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut formatter = f.debug_struc...
the_stack
use std::cmp; use std::fmt::Debug; use std::future::Future; use std::io::{Error as IoError, SeekFrom}; use std::ops::{Deref, DerefMut}; use std::pin::Pin; use std::sync::Arc; use std::task::{Context, Poll}; use std::time::Duration; use err_context::AnyError; use log::trace; use pin_project::pin_project; use serde::de:...
the_stack
#[cfg(test)] mod test; use crate::{ common::ende::{KeyEnDeOrdered, ValueEnDe}, versioned::mapx_ord_rawkey::{ MapxOrdRawKeyVs, MapxOrdRawKeyVsIter, MapxOrdRawKeyVsIterMut, ValueIterMut, }, BranchName, VersionName, VsMgmt, }; use ruc::*; use serde::{Deserialize, Serialize}; use std::{ borrow:...
the_stack
use std::collections::{BTreeMap, HashMap}; use std::{fmt, path}; use std::borrow::Cow; use time::{macros::format_description, format_description::FormatItem}; use crate::RawStr; use crate::uri::fmt::{Part, Path, Query, Formatter}; /// Trait implemented by types that can be displayed as part of a URI in /// [`uri!`]....
the_stack
use num_bigint::BigUint; use sp_ropey::Rope; use sp_ipld::Ipld; use sp_std::{ borrow::ToOwned, fmt, vec::Vec, }; use alloc::string::{ String, ToString, }; use crate::{ defs, ipld_error::IpldError, literal::Literal, parse, term::Term, yatima, }; use core::convert::{ TryFrom, TryInto, }; //...
the_stack
use rlua::{self, Lua, UserData, UserDataMethods}; use select::{self, node::Raw}; use std::{ mem, sync::Arc }; use rlua_serde; /// Please read `select`'s documentation to know the meanings of each variants. #[derive(Serialize, Deserialize)] enum Predicate { Any, Text, Element, Comment, Class...
the_stack
//**************************************************************************** // Automatically generated from yaml/swiftnav/sbp/ssr.yaml // with generate.py. Please do not hand edit! //****************************************************************************/ //! Precise State Space Representation (SSR) corrections...
the_stack
use libquickjs_sys as q; use crate::{ExecutionError, JsValue, ValueError}; use super::make_cstring; use crate::bindings::ContextWrapper; #[repr(i32)] #[derive(PartialEq, Eq, Clone, Copy, Debug)] pub enum JsTag { // Used by C code as a marker. // Not relevant for bindings. // First = q::JS_TAG_FIRST, ...
the_stack
use core::convert::TryInto; use gdbstub::common::Signal; use gdbstub::target::ext::base::singlethread::{ SingleThreadOps, SingleThreadSingleStep, SingleThreadSingleStepOps, }; use gdbstub::target::ext::base::SingleRegisterAccessOps; use gdbstub::target::{TargetError, TargetResult}; use log::{debug, error, info, tr...
the_stack
use num_traits::Zero; use once_cell::sync::Lazy; use casper_engine_test_support::{ internal::{ utils, DeployItemBuilder, ExecuteRequestBuilder, InMemoryWasmTestBuilder, UpgradeRequestBuilder, DEFAULT_ACCOUNTS, DEFAULT_ACCOUNT_PUBLIC_KEY, DEFAULT_MAX_ASSOCIATED_KEYS, DEFAULT_PAYMENT, DEFAULT...
the_stack
use crate::Slab; use loom::sync::{Arc, Condvar, Mutex}; use loom::thread; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; mod idx { use crate::{ cfg, page::{self, slot}, Pack, Tid, }; use proptest::prelude::*; proptest! { #[test] fn tid_roundtrips(t...
the_stack
extern crate failure; extern crate structopt; extern crate strum; extern crate strum_macros; extern crate chrono; use chrono::offset::Utc; use chrono::DateTime; extern crate walkdir; use walkdir::WalkDir; use std::env; use std::fs; use std::io::Write; use std::path::PathBuf; use std::process::{Command, Output}; u...
the_stack
use std::fs::{File, OpenOptions}; use std::io::Write; use std::path::{Path, PathBuf}; use serde_json::{Deserializer, Value}; use tempfile::NamedTempFile; use crate::index_controller::dump_actor::loaders::compat::{asc_ranking_rule, desc_ranking_rule}; use crate::index_controller::dump_actor::Metadata; use crate::index...
the_stack
use timely::dataflow::operators::{Concat, Concatenate}; use timely::dataflow::scopes::child::Iterative; use timely::dataflow::Scope; use timely::order::Product; use timely::progress::Timestamp; use differential_dataflow::lattice::Lattice; use differential_dataflow::AsCollection; use crate::binding::AsBinding; use cra...
the_stack
use std::io::BufRead; use std::time::{Duration, Instant}; use rayon::slice::ParallelSliceMut; use icon::{Icon, ICON_LEN}; use matcher::Bonus; use utility::{println_json, println_json_with_length}; use super::*; use crate::FilteredItem; /// The constant to define the length of `top_` queues. const ITEMS_TO_SHOW: usi...
the_stack
use std::{fmt::Debug, ops::DerefMut}; use std::cell::RefCell; use std::collections::HashMap; use std::panic::{catch_unwind, PanicInfo, UnwindSafe}; use std::sync::{Condvar, Mutex, MutexGuard}; use clipboard::{ClipboardContext, ClipboardProvider}; use glutin::{dpi::LogicalSize, event_loop::{ControlFlow, EventLoop, Even...
the_stack
clippy::too_many_lines, clippy::cast_possible_wrap, clippy::cast_sign_loss )] use std::{borrow::Cow, sync::Arc}; use arrow::{array, array::ArrayRef, datatypes::DataType}; use super::{ boolean::Column as BooleanColumn, change::ArrayChange, flush::GrowableBatch, ArrowBatch, Batch as BatchRepr, DynamicB...
the_stack
use ide_db::helpers::{for_each_tail_expr, node_ext::walk_expr, FamousDefs}; use itertools::Itertools; use syntax::{ ast::{self, Expr}, match_ast, AstNode, TextRange, TextSize, }; use crate::{AssistContext, AssistId, AssistKind, Assists}; // Assist: unwrap_result_return_type // // Unwrap the function's return ...
the_stack
use { crate::format::CodeStr, colored::{control::SHOULD_COLORIZE, Colorize}, pad::{Alignment, PadStr}, std::{ cmp::{max, min}, error, fmt, path::Path, rc::Rc, }, }; // This is the primary error type we'll be using everywhere. #[derive(Clone, Debug)] pub struct Error ...
the_stack
#![allow(unused, dead_code)] use e2e_tests::TestClient; use parsec_client::core::interface::operations::psa_algorithm::{Algorithm, AsymmetricEncryption}; use parsec_client::core::interface::operations::psa_key_attributes::{ Attributes, Lifetime, Policy, Type, UsageFlags, }; use parsec_client::core::interface::requ...
the_stack
#![warn(clippy::all)] #![warn(missing_docs)] mod config; use std::{error, fmt, sync::Arc}; use webrtc_audio_processing_sys as ffi; pub use config::*; pub use ffi::NUM_SAMPLES_PER_FRAME; /// Represents an error inside webrtc::AudioProcessing. /// See the documentation of [`webrtc::AudioProcessing::Error`](https://cg...
the_stack
use std::vec::Vec; use std::ops::Index; use std::convert::From; use std::convert::AsRef; //use nom::{IResult, space, alpha, alphanumeric, digit}; use rusticata_macros::bytes_to_u64; use oid::Oid; use error::DerError; /// Defined in X.680 section 8.4 #[derive(Debug,PartialEq)] #[repr(u8)] pub enum DerTag { EndOfCo...
the_stack
//! Utilities for Rust numbers. use crate::lib::ops; /// Precalculated values of radix**i for i in range [0, arr.len()-1]. /// Each value can be **exactly** represented as that type. const F32_POW10: [f32; 11] = [ 1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, ...
the_stack
use openmls_traits::OpenMlsCryptoProvider; use crate::ciphersuite::signable::Signable; use crate::config::Config; use crate::credentials::CredentialBundle; use crate::framing::*; use crate::group::mls_group::*; use crate::group::*; use crate::messages::*; /// Wrapper for proposals by value and reference. pub struct P...
the_stack
use std::{ alloc::Layout, cmp, collections::HashMap, marker::PhantomData, mem::{self, ManuallyDrop, MaybeUninit}, ptr::{self, from_raw_parts, metadata, DynMetadata}, slice, }; use bumpalo::Bump; use either::Either; use gazebo::prelude::*; use crate::values::layout::avalue::{AValue, AValueD...
the_stack
//! Module to parse chain events //! //! This file is very similar to subxt, except where noted. use crate::{ error::{Error, RuntimeError}, metadata::{EventMetadata, Metadata, MetadataError}, Phase, }; use ac_primitives::Hash; use codec::{Codec, Compact, Decode, Encode, Input}; use scale_info::{TypeDef, Ty...
the_stack
use super::handle::Handle; use super::submission_handler::SubmissionHandler; use futures::io::{AsyncRead, AsyncWrite, SeekFrom}; use std::{fs::File, pin::Pin, task::Context, task::Poll}; use std::{io, task}; use std::net::TcpStream; #[cfg(unix)] use std::os::unix::net::UnixStream; #[cfg(unix)] use std::{ mem::Ma...
the_stack
use futures_lite::{io::Cursor, ready, AsyncRead, AsyncReadExt}; use std::{ borrow::Cow, convert::TryInto, fmt::Debug, io::{Error, ErrorKind, Result}, pin::Pin, task::{Context, Poll}, }; use BodyType::*; /// The trillium representation of a http body. This can contain /// either `&'static [u8]` ...
the_stack
use crate::cx::*; use makepad_live_compiler::generate_glsl; use makepad_live_compiler::analyse::ShaderCompileOptions; use makepad_live_compiler::shaderast::ShaderAst; impl Cx { pub fn render_view( &mut self, pass_id: usize, view_id: usize, scroll: Vec2, clip: (Vec2, Vec2), ...
the_stack
use std::borrow::Cow; const LONE_SURROGATE_ESCAPE_CHAR: u8 = 0x7F; const LONE_SURROGATE_UNIT_1: u8 = 0xED; const LONE_SURROGATE_UNIT_2_MIN: u8 = 0xA0; const LONE_SURROGATE_UNIT_2_MAX: u8 = 0xBF; const LONE_SURROGATE_UNIT_3_MIN: u8 = 0x80; const LONE_SURROGATE_UNIT_3_MAX: u8 = 0xBF; const LEAD_SURROGATE_MIN: u16 = 0x...
the_stack
use crate::*; use cached::proc_macro::cached; use std::{ fmt::Display, path::{Path, PathBuf}, }; /* Documents The game's documents directory. CLEO x.csa A script that is loaded when the game loads and should only exit when the game does. x.csi A script that is launch...
the_stack
use std::any::Any; use std::cell::RefCell; use std::rc::Rc; use sulis_core::config::Config; use sulis_core::io::{DrawList, GraphicsRenderer}; use sulis_core::resource::{ResourceSet, Sprite}; use sulis_core::ui::{Callback, Color, Widget, WidgetKind}; use sulis_core::util::{Offset, Point, Rect, Scale}; use sulis_core::w...
the_stack
use std::fmt::Display; use crate::utils::{set_row_to_row_sum, set_vec_to_row_sum, swap_columns}; use ndarray::{s, Array, Array1, Array2}; use serde::{Deserialize, Serialize}; #[cfg(feature = "python")] use pyo3::{prelude::*, PyObjectProtocol}; #[cfg(feature = "python")] use std::io::{Error, ErrorKind}; /// Represen...
the_stack
use std::cell::RefCell; use std::collections::VecDeque; use std::fmt::Write; use std::fs::File; use std::rc::Rc; use std::sync::Arc; use crate::api::meta::OperatorInfo; use crate::channel_id::ChannelInfo; use crate::communication::output::OutputBuilderImpl; use crate::data::MicroBatch; use crate::data_plane::{GeneralP...
the_stack
use crate::ability::ActivateAbility; use crate::actor::{AlterAbilities, RegenerateAbilities}; use crate::battle::{BattleRules, EndBattle, Version}; use crate::character::{AlterStatistics, RegenerateStatistics}; use crate::creature::{ConvertCreature, CreateCreature, RemoveCreature}; use crate::entropy::ResetEntropy; use...
the_stack
use super::{ advertisement_data_type, bindings, ble::characteristic::BLECharacteristic, ble::device::BLEDevice, ble::service::BLEService, utils, }; use crate::{ api::{ bleuuid::{uuid_from_u16, uuid_from_u32}, AddressType, BDAddr, CentralEvent, Characteristic, Peripheral as ApiPeripheral, ...
the_stack
extern crate es_core; extern crate es_data; extern crate rand; extern crate rand_xorshift; use std::mem; use self::rand::distributions::{Distribution, Uniform}; use self::rand::seq::SliceRandom; use self::rand::SeedableRng; use self::rand_xorshift::XorShiftRng; use std::cmp::Ordering; use std::collections::binary_he...
the_stack
use std::borrow::{Borrow, BorrowMut, ToOwned}; use std::ffi::CStr; use std::fmt; use std::mem; use std::ops; use std::ptr; use glib::translate::*; use glib::StaticType; use crate::sdp_attribute::SDPAttribute; use crate::sdp_bandwidth::SDPBandwidth; use crate::sdp_connection::SDPConnection; use crate::sdp_key::SDPKey;...
the_stack
use std::collections::BTreeMap; use serde::Serialize; use serde_test::{assert_ser_tokens, Token}; use valuable::*; use valuable_serde::Serializable; macro_rules! assert_ser_eq { ($value:expr, &[$($tokens:tt)*] $(,)?) => {{ let value = &$value; assert_ser_tokens(&Serializable::new(value), &[$($toke...
the_stack
use async_compat::CompatExt; use distant_core::{ data::{DirEntry, Error as DistantError, FileType, Metadata, RunningProcess, SystemInfo}, Request, RequestData, Response, ResponseData, }; use futures::future; use log::*; use std::{ collections::HashMap, future::Future, io::{self, Read, Write}, pa...
the_stack
// Derived from Chromium's accessibility abstraction. // Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. #![allow(non_upper_case_globals)] use accesskit::kurbo::Point; use accesskit::{CheckedStat...
the_stack
use fp::FP; //mod ecp; use ecp::ECP; //mod fp2; use fp2::FP2; //mod ecp2; use ecp2::ECP2; //mod fp4; use fp4::FP4; //mod fp12; use fp12::FP12; //mod big; use big::BIG; //mod dbig; use dbig::DBIG; //mod rand; //mod hash256; //mod rom; use rom; #[allow(non_snake_case)] fn linedbl(A: &mut ECP2,qx: &mut FP,qy: &mut FP) ...
the_stack
use lazy_static::lazy_static; use slog::{debug, o}; use std::cell::RefCell; use std::rc::Rc; use memory_tracker::MemoryTracker; pub struct Area<'a> { register_args: *mut memory_tracker_area_handler_args<'a>, mapping: Rc<RefCell<ExternalMapping<'a>>>, log: slog::Logger, } impl<'a> Area<'a> { pub fn ar...
the_stack
use crate::{ arbitraries::queries::{ input_info_strategies::input_info_strategies::get_input_info_strategies, queries::{ InputInfo, MutationType } }, utilities::graphql::{ get_object_type_from_field, is_graphql_type_a_relation_many } }; use...
the_stack
use crate::components::apply_chunk_output::ParsedTransactionOutput; use anyhow::{anyhow, bail, ensure, Result}; use aptos_crypto::{hash::CryptoHash, HashValue}; use aptos_state_view::{account_with_state_cache::AsAccountWithStateCache, StateViewId}; use aptos_types::{ account_view::AccountView, epoch_state::Epoc...
the_stack
use crate::database::ExecutedAction; #[cfg(test)] use crate::database::{ActionType, LinkedItem}; use database::DisplayMode; use diesel::prelude::*; use regex::Regex; use skim::prelude::*; use std::borrow::Borrow; use std::collections::HashMap; use std::env; use std::io::Write; use std::path::Path; use std::path::PathBu...
the_stack
//! Structs for Tube based endpoint. Listeners are not used with Tubes, since they are essentially //! fancy socket pairs. use std::io::{IoSlice, IoSliceMut}; use std::path::Path; use std::ptr::copy_nonoverlapping; use base::{AsRawDescriptor, FromRawDescriptor, RawDescriptor, Tube}; use serde::{Deserialize, Serialize...
the_stack
use crate::battle::{Battle, BattleRules, BattleState}; use crate::creature::{Creature, CreatureId}; use crate::entropy::Entropy; use crate::error::{WeaselError, WeaselResult}; use crate::event::{Event, EventKind, EventProcessor, EventQueue, EventTrigger}; use crate::metric::system::*; use crate::metric::{ReadMetrics, W...
the_stack
//**************************************************************************** // Automatically generated from yaml/swiftnav/sbp/bootload.yaml // with generate.py. Please do not hand edit! //****************************************************************************/ //! Messages for the bootloading configuration of a...
the_stack
use core::alloc::Layout; use core::convert::TryFrom; use core::fmt; use core::ptr; use core::slice; use alloc::boxed::Box; use crate::borrow::CloneToProcess; use crate::erts; use crate::erts::exception::AllocResult; use crate::erts::process::alloc::TermAlloc; use crate::erts::string::Encoding; use crate::erts::term::...
the_stack
use crate::events::{ShapeEvent, SpecEvent}; use crate::queries::shape::{ChoiceOutput, ShapeQueries}; use crate::shapes::traverser::ShapeTrailPathComponent::ObjectFieldTrail; use crate::shapes::ShapeTrail; use crate::state::shape::{ FieldId, FieldShapeDescriptor, ParameterShapeDescriptor, ProviderDescriptor, ShapeId, ...
the_stack
use super::{sys, DispatchObject, DispatchQos, DispatchQosClass}; use std::{ ffi::{c_void, CStr, CString}, fmt, mem::{self, ManuallyDrop, MaybeUninit}, panic, process, ptr, }; mod attr; mod builder; mod priority; pub use attr::*; pub use builder::*; pub use priority::*; subclass! { /// An object t...
the_stack
//! Blockchain state //! //! For [technical reasons](https://www.tari.com/2019/07/15/tari-protocol-discussion-42.html), the commitment in //! block headers commits to the entire TXO set, rather than just UTXOs using a merkle mountain range. //! However, it's really important to commit to the actual UTXO set at a given ...
the_stack
use super::*; #[test] fn variance_lowering() { lowering_success! { program { #[variance(Invariant, Covariant)] struct Foo<T, U> {} struct Bar<T, U> {} #[variance(Invariant, Contravariant)] fn foo<T, U>(t: T, u: U); fn bar<T, U>(t: T, u...
the_stack
//! Procedural macro crate for simplifying writing async entry points //! //! This crate should not be depended upon directly, but should be used through //! the fuchsia_async crate, which re-exports all these symbols. //! //! Program entry points, by they `main` or `#[test]` functions, that want to //! perform asynchr...
the_stack
use cortexm4::support::atomic; use enum_primitive::cast::FromPrimitive; use enum_primitive::enum_from_primitive; use kernel::platform::chip::ClockInterface; use kernel::utilities::cells::OptionalCell; use kernel::utilities::registers::interfaces::{ReadWriteable, Readable, Writeable}; use kernel::utilities::registers::{...
the_stack
pub type blkcnt_t = i64; pub type blksize_t = i64; pub type clock_t = i64; pub type c_char = u8; pub type c_long = i64; pub type c_ulong = u64; pub type fsblkcnt_t = ::c_ulong; pub type fsfilcnt_t = ::c_ulong; pub type fsword_t = ::c_long; pub type ino_t = ::c_ulong; pub type nlink_t = ::c_uint; pub type off_t = ::c_lo...
the_stack
use mock::{ClientRequest, HttpBuffer}; use server::{FieldHeaders, MultipartField, ReadEntry}; use mime::Mime; use rand::seq::SliceRandom; use rand::{self, Rng}; use std::collections::hash_map::{Entry, OccupiedEntry}; use std::collections::{HashMap, HashSet}; use std::fmt; use std::io::prelude::*; use std::io::Curso...
the_stack
use std::fs::OpenOptions; use std::io::prelude::*; use std::str; use std::collections::VecDeque; use std::path; use std::process; use std::collections::{HashMap, HashSet}; use error; use parser; use parser::{Error, ParseR}; use node::Bits; extern crate ansi_term; use self::ansi_term::{Colour, Style}; #[derive(Debug, ...
the_stack
use crate::{t_eprint, t_print, t_print_nl}; use std::ptr; use super::xetex_texmfmp::get_date_and_time; use crate::cmd::*; use crate::fmt_file::{load_fmt_file, store_fmt_file}; use crate::help; use crate::node::*; use crate::trie::*; use crate::xetex_consts::*; use crate::xetex_errors::{confusion, error, overflow}; use...
the_stack
use std::{ fmt::{Display, Formatter}, fs, io, path::{Path, PathBuf}, result, }; use logger::warn; // Based on https://elixir.free-electrons.com/linux/v4.9.62/source/arch/arm64/kernel/cacheinfo.c#L29. const MAX_CACHE_LEVEL: u8 = 7; #[derive(Debug)] pub(crate) enum Error { FailedToReadCacheInfo(io:...
the_stack
use std::borrow::Borrow; use std::collections::VecDeque; use linalg::{Matrix, BaseMatrix, Vector}; use learning::error::Error; use super::{KNearest, KNearestSearch, get_distances, dist}; /// Binary tree #[derive(Debug)] pub struct BinaryTree<B: BinarySplit> { // Binary tree leaf size leafsize: usize, // ...
the_stack
use std::io; use git_features::{progress, progress::Progress}; use git_transport::{ client, client::{SetServiceResponse, TransportV2Ext}, Service, }; use maybe_async::maybe_async; use crate::{ credentials, fetch::{refs, Action, Arguments, Command, Delegate, Error, LsRefsAction, Response}, }; /// ...
the_stack
#![allow(dead_code)] use std::error; use std::fmt; use crate::types::uapi; #[derive(Debug)] pub struct Errno { value: u32, name: &'static str, file: Option<String>, line: Option<u32>, } impl Errno { pub fn new(value: i32, name: &'static str, file: String, line: u32) -> Errno { Errno { va...
the_stack
pub(crate) use math::make_module; #[pymodule] mod math { use crate::vm::{ builtins::{try_bigint_to_f64, try_f64_to_bigint, PyFloat, PyInt, PyIntRef}, function::{ArgIntoFloat, ArgIterable, OptionalArg, PosArgs}, utils::Either, PyObjectRef, PyRef, PyResult, PySequence, TypeProtocol, V...
the_stack
#![deny(missing_docs)] /* Currently unused but this is the formula for using temperature calibration: Temperature in °C = (110-30) * (adc_sample - VtempCal30::get().read()) / (VtempCal110::get().read()-VtempCal30::get().read()) + 30 */ use crate::dma::traits::PeriAddress; use crate::rcc::{Enable, Reset}; use ...
the_stack
use std::mem; use protobuf; use session_error::SessionError; use signalling::ClientToStation; use stream_traits::{ReadStat, StreamReceiver}; // This file is the reading half of the station's implementation of the outer // framing protocol. The outer framing protocol (type+len followed by blob) is // never supposed t...
the_stack
#![allow(clippy::many_single_char_names)] // Sometimes we need |x| f(x) to do type/lifetime conversion, sometimes we don't. // Most consistent to use the closure everywhere. #![allow(clippy::redundant_closure)] use crate::syntax::ast::{ AssignP, AstAssignIdentP, AstExprP, AstPayload, AstStmtP, ClauseP, ExprP, ForC...
the_stack
use super::{maze, Config, Surface}; use dungeon::{Coord, Positioned, X, Y}; use error::*; use fenwick::FenwickSet; use fixedbitset::FixedBitSet; use rect_iter::{IntoTuple2, RectRange}; use rng::RngHandle; use tuple_map::TupleMap2; /// type of room #[derive(Clone, Debug, Serialize, Deserialize)] pub enum RoomKind { ...
the_stack
nonstandard_style, rust_2018_idioms, rustdoc::broken_intra_doc_links, rustdoc::private_intra_doc_links )] #![forbid(non_ascii_idents, unsafe_code)] #![warn( deprecated_in_future, missing_copy_implementations, missing_debug_implementations, missing_docs, unreachable_pub, unused_import...
the_stack
use std::{ collections::{BTreeMap, BTreeSet}, sync::Arc, time::Duration, }; use parking_lot::Mutex; use sui_types::{ base_types::{AuthorityName, TransactionDigest}, error::SuiError, messages::{CertifiedTransaction, ConfirmationTransaction, TransactionInfoRequest}, messages_checkpoint::{ ...
the_stack
#[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct UploadMetadata { /// <p>This is the pre-signed URL that can be used for uploading the file to Amazon S3 when used in response to <a href="https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_StartAttachmentUpload.html"...
the_stack
use std::fs; use std::path::{Path, PathBuf}; use std::sync::atomic::{AtomicUsize, Ordering}; use parking_lot::Mutex; use image::DynamicImage; use arcropolis_api::{arc_callback, load_original_file}; use skyline::hooks::{ getRegionAddress, Region, InlineCtx }; use smash::lib::lua_const::FIGHTER_KIND_PICKEL...
the_stack
//! Linear algebra types and functions. //! Most of the code in this module was borrowed from the `cgmath` package. pub use num_traits::{cast, Float, One, Zero}; /// 2D vector. #[repr(C)] #[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)] pub struct Vector2<S> { pub x: S, pub y: S, } impl<S: Sized> Vector2<S...
the_stack
// TODO: // - Figure out how to panic without allocating // - Support all Unices, not just Linux and Mac // - Add tests for UntypedObjectAlloc impls #![cfg_attr(not(test), no_std)] #![cfg_attr(test, feature(test))] #![feature(alloc, allocator_api)] #[cfg(not(any(target_os = "linux", target_os = "macos", windows)))] c...
the_stack
use crate::types::BfCharT; /// @copyright /// Copyright (C) 2020 Assured Information Security, Inc. /// /// @copyright /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentation files (the "Software"), to deal /// in the Software without restrictio...
the_stack
use std::mem; use super::geometry::Vertex; use super::consts::DEPTH_FORMAT; use super::material::MaterialFactorsUpload; pub struct MeshPipeline { pub part_bind_group_layout: wgpu::BindGroupLayout, pub pipeline: wgpu::RenderPipeline, } impl MeshPipeline { fn new( swapchain_format: wgpu::TextureFor...
the_stack
//! This module contains all the types for demuxing DNS oriented streams. use std::marker::PhantomData; use std::pin::Pin; use std::task::{Context, Poll}; use futures_channel::mpsc; use futures_util::future::{Future, FutureExt}; use futures_util::stream::{Peekable, Stream, StreamExt}; use log::{debug, warn}; use cra...
the_stack
use crate::network::ZcashNetwork; use wagyu_model::derivation_path::{ChildIndex, DerivationPath, DerivationPathError}; use wagyu_model::no_std::{vec, ToString, Vec}; use core::{convert::TryFrom, fmt, marker::PhantomData, str::FromStr}; /// Represents a Zcash derivation path #[derive(Clone, PartialEq, Eq)] pub enum Zc...
the_stack
use std::borrow::Cow; use wasm_encoder::BlockType; use wasm_encoder::CodeSection; use wasm_encoder::ElementSection; use wasm_encoder::EntityType; use wasm_encoder::Function; use wasm_encoder::ImportSection; pub use wasm_encoder::Instruction; use wasm_encoder::MemArg; use wasm_encoder::Module; use wasm_encoder::RawSecti...
the_stack
use bulletproofs::{r1cs, r1cs::ConstraintSystem, PedersenGens}; use curve25519_dalek::ristretto::CompressedRistretto; use curve25519_dalek::scalar::Scalar; use serde::{Deserialize, Serialize}; use std::iter::FromIterator; use std::ops::{Add, Neg}; use subtle::{ConditionallySelectable, ConstantTimeEq}; use crate::encod...
the_stack
use alloc::vec::Vec; use core::fmt; use core::num::{NonZeroU64, Wrapping}; use core::result; use crate::common::{ DebugLineOffset, DebugLineStrOffset, DebugStrOffset, DebugStrOffsetsIndex, Encoding, Format, LineEncoding, SectionId, }; use crate::constants; use crate::endianity::Endianity; use crate::read::{Att...
the_stack
use std::collections::HashMap; use syn::Path; use crate::bridged_type::{BridgedType, TypePosition}; use crate::codegen::generate_swift::generate_function_swift_calls_rust::gen_func_swift_calls_rust; use crate::codegen::generate_swift::opaque_copy_type::generate_opaque_copy_struct; use crate::codegen::generate_swift::...
the_stack
use std::{convert::TryFrom, fmt, fmt::Formatter, net::SocketAddr, ops::Range}; use ipnetwork::IpNetwork; use serde::de::{self, Visitor}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use crate::{filters::ConvertProtoConfigError, map_proto_enum}; use super::quilkin::extensions::filters::firewall::v1a...
the_stack
use crate::error::{CudaResult, ToResult}; use crate::memory::device::AsyncCopyDestination; use crate::memory::device::{CopyDestination, DeviceBuffer}; use crate::memory::DeviceCopy; use crate::memory::DevicePointer; use crate::stream::Stream; use crate::sys as cuda; #[cfg(feature = "bytemuck")] use bytemuck::{Pod, Zero...
the_stack
use std::fs::File; use std::io::{BufReader, Cursor, Read}; use std::path::Path; use crate::errors::SicIoError; use sic_core::image::{AnimationDecoder, DynamicImage, ImageFormat}; use sic_core::{image, AnimatedImage, SicImage}; /// Load an image using a reader. /// All images are currently loaded from memory. pub fn l...
the_stack
// -- mod mod object; // Locals use super::{ FileTransfer, FileTransferError, FileTransferErrorType, FileTransferResult, ProtocolParams, }; use crate::fs::{FsDirectory, FsEntry, FsFile}; use crate::utils::path; use object::S3Object; // ext use s3::creds::Credentials; use s3::serde_types::Object; use s3::{Bucket, ...
the_stack