text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use crate::{types::*, utils::parallelism::MaybeParallelRefIterator}; use bimap::BiMap; use fst::{IntoStreamer, Map, Streamer}; use log::error; use serde::{Deserialize, Serialize}; use std::{ borrow::Cow, cell::UnsafeCell, fmt, iter::{once, FusedIterator}, }; #[derive(Debug, Copy, Clone, Serialize, Dese...
the_stack
extern crate proc_macro; use proc_macro2::{Span, TokenStream}; use quote::quote; use syn::{ parse::{Parse, ParseStream}, punctuated::Punctuated, visit_mut::VisitMut, Attribute, AttributeArgs, ConstParam, Expr, ExprCall, ExprPath, FnArg, GenericArgument, GenericMethodArgument, GenericParam, Ident, ...
the_stack
// You should have received a copy of the MIT License // along with the Jellyfish library. If not, see <https://mit-license.org/>. use crate::{RescueParameter, ROUNDS, STATE_SIZE}; use ark_ed_on_bls12_381::Fq; // the constants in this file are generated with // https://github.com/EspressoSystems/Marvellous/blob/fcd4c...
the_stack
use crate::{irc::*, MaybeOwned, MaybeOwnedIndex, Validator}; use crate::twitch::{ parse_badges, parse_badges_iter, parse_emotes, Badge, BadgeInfo, BadgeKind, Color, Emotes, }; /// Some PRIVMSGs are considered 'CTCP' (client-to-client protocol) /// /// This is a tag-type for determining what kind of CTCP it was #[...
the_stack
use std::fmt; use chrono::*; use console::Style; use uuid::Uuid; use redis::{ Client as RedisClient, Commands, FromRedisValue, from_redis_value, Value, RedisResult, ToRedisArgs, RedisWrite, }; // Improve it.(Use something else instead of using 'extern crate serde' directly here) extern crate serde...
the_stack
use crate::ast; use crate::mir; use crate::util::constant_propagate; use crate::{CompileError, CompileResult}; use std::collections::HashMap; use std::f64::consts; // lowers an AST into a Block MIR object pub fn lower_ast(id: mir::BlockId, block: &ast::Block) -> CompileResult<mir::Block> { let mut lower = AstLower...
the_stack
use std::{ collections::{BTreeMap, HashSet}, iter, mem, }; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens}; use syn::{ parse2, parse_str, punctuated::Punctuated, Field, FieldValue, Ident, Member, Meta, MetaList, NestedMeta, Path, Token, Type, }; use yarte_dom::dom::{ Attri...
the_stack
use abi_stable_shared::const_utils::low_bit_mask_u64; use core_extensions::{ SelfOps, matches, }; use syn::{ punctuated::Punctuated, Ident, WherePredicate, TypeParamBound, Visibility, }; use quote::{ToTokens,quote_spanned}; use as_derive_utils::{ datastructure::{DataStructure,Field,F...
the_stack
use tokenizers as tk; use pyo3::exceptions; use pyo3::prelude::*; use pyo3::types::*; use super::{ DestroyPtr, PyNormalizedString, PyNormalizedStringRefMut, RefMutContainer, RefMutGuard, }; use crate::encoding::PyEncoding; use crate::error::ToPyResult; use crate::token::PyToken; use tk::{OffsetReferential, Offset...
the_stack
use std::convert::TryFrom; use num::{NumCast, One, Zero}; #[cfg(feature = "use-mpfr")] use rug::Float; use crate::error::Fallible; use crate::traits::FloatBits; // general overview of casters: // https://docs.google.com/spreadsheets/d/1DJohiOI3EVHjwj8g4IEdFZVf7MMyFk_4oaSyjTfkO_0/edit?usp=sharing /// Fallible castin...
the_stack
use super::dh; use crate::api::dkg_errors::{ DkgCreateDealingError, DkgCreateReshareDealingError, DkgVerifyDealingError, DkgVerifyReshareDealingError, InvalidArgumentError, MalformedDataError, MalformedSecretKeyError, SizeError, }; use crate::types::public_coefficients::conversions::pub_key_bytes_from_pub_c...
the_stack
use cpu::CPU; use memory::MemSegment; pub struct Disassembler<'a> { pc: u16, cpu: &'a mut CPU, bytes: Vec<u8>, unofficial: bool, } struct PartialInstruction { pattern: String, } impl PartialInstruction { fn finish(self, instr: &str) -> String { self.pattern.replace("$$...
the_stack
use serde::{Deserialize, Serialize}; use serde_json::json; use crate::api::*; use yew::services::fetch::{FetchService, FetchTask, Request, Response}; use yew::services::timeout::{TimeoutService, TimeoutTask}; use std::time::Duration; use yew::{ format::{Json, Nothing}, prelude::*, utils::*, }; use yew::Prop...
the_stack
use gc_ref::{GcFrozenRef, GcRef}; use marking::{MarkingTracer, mark}; use pages::{self, PageSet, PageSetRef, TypedPage, UninitializedAllocation}; use ptr::{Pointer, UntypedPointer}; use signposts; use std::any::TypeId; use std::cmp; use std::collections::HashMap; use std::hash::{Hasher, BuildHasher}; use std::marker::P...
the_stack
mod output_directory; use { anyhow::{anyhow, format_err, Context, Result}, async_trait::async_trait, errors::ffx_bail, ffx_core::ffx_plugin, ffx_test_args::{ DeleteResultCommand, ListCommand, ResultCommand, ResultSubCommand, RunCommand, ShowResultCommand, TestCommand, TestSubcommand...
the_stack
use crate::caret::CaretType; use crate::common::{Direction, CDEG_RAD}; use crate::framework::error::GameResult; use crate::npc::list::NPCList; use crate::npc::NPC; use crate::player::Player; use crate::rng::RNG; use crate::shared_game_state::SharedGameState; impl NPC { // Gaudi from room 2 pub(crate) fn tick_n...
the_stack
#[macro_use] extern crate lazy_static; extern crate libc; #[macro_use] extern crate log; extern crate serde; extern crate serde_json; use std::mem; use std::os::raw::c_void; use std::sync::mpsc::Sender; use jni_sys::{jlong, JNIEnv, jobject}; pub use jni_sys as jni_sys; pub use self::api::Callback as Callback; pub us...
the_stack
#[allow(unused)] fn runner() -> crate::TestRunner { super::runner() } mod divide { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong result fn no_whitespace() { assert_eq!( runner().ok("a {b: calc(1px/2)}\n"), "a {\ \n b: 0.5px;\ ...
the_stack
mod sliding_window; pub use sliding_window::{SlidingWindow, SlidingWindowError}; mod protected_packet_number; pub use protected_packet_number::ProtectedPacketNumber; //= https://www.rfc-editor.org/rfc/rfc9000#section-12.3 //# The packet number is an integer in the range 0 to 2^62-1. This //# number is used in determ...
the_stack
use crate::{ internal::epoch::{QuiesceEpoch, EPOCH_CLOCK, TICK_SIZE}, stats, }; use core::{ cell::Cell, mem, ptr::NonNull, sync::atomic::{self, AtomicU8, AtomicUsize, Ordering::Relaxed}, }; use parking_lot_core::{self, FilterOp, ParkResult, ParkToken, UnparkResult, UnparkToken}; use std::thread;...
the_stack
use crate::num::{Integer, Signed, ToPrimitive, Zero}; use crate::num_bigint::{BigInt, ToBigInt}; use crate::*; use divrem::RemFloor; use num::traits::Pow; use std::convert::TryInto; // modulus operation (%) // // Ruby use `floored division` for divide/modulus operation. pub fn rem_fixnum(lhsi: i64, rhs: Value) -> VMR...
the_stack
extern crate bytes; extern crate tokio_io; extern crate async_tokio; use bytes::BytesMut; use tokio_io::codec::{Decoder}; use async_tokio::http::{ ConnectionType, ContentCompression, Error, RequestDecoder, RequestMessage, Version}; macro_rules! test { ($name:ident, $($data:expr),+ => |$codec:ident, $buf:ident...
the_stack
use crate::main_win::StartedPlugins; use crate::syntax_config::{Changes, Domain, SyntaxParams}; use editview::MainState; use gettextrs::gettext; use gio::prelude::*; use gio::{Settings, SettingsBindFlags}; use glib::{clone, GString}; use gtk::prelude::*; use gtk::{ ApplicationWindow, Builder, Button, ComboBoxText, ...
the_stack
#![cfg_attr(target_os = "windows", allow(dead_code))] mod parser; use crate::ev::{self, Axis, AxisOrBtn, Button}; use gilrs_core::native_ev_codes as nec; use gilrs_core::EvCode; use std::collections::HashMap; use std::env; use std::error::Error; use std::fmt::{Display, Formatter, Result as FmtResult}; use fnv::FnvH...
the_stack
use super::*; use cl; use ff::PrimeField; use pairing::Engine; use rand::Rng; use wallet; // for blind signature use secp256k1; // for on-chain keys use HashMap; use channels_util::ProtocolStatus; use channels_zk::ClosedCommitments; pub use channels_zk::{ BoltError, ChannelParams, ChannelState, ChannelToken, Chann...
the_stack
use crate::storage::schema::PostMigrationAction; use anyhow::Context; use rusqlite::Transaction; pub(crate) fn migrate(transaction: &Transaction) -> anyhow::Result<PostMigrationAction> { // We need to check if this db needs fixing at all let update_is_not_required = { let mut stmt = transaction ...
the_stack
use futures::stream::{self, StreamExt}; use shipcat_definitions::{BaseManifest, Config, Region, ShipcatConfig}; use shipcat_filebacked::SimpleManifest; use super::{kubectl, Error, ErrorKind, Result}; use crate::{ apply, diff, helm, kubeapi::ShipKube, webhooks::{self, UpgradeState}, }; struct DiffResult { ...
the_stack
use { proc_macro2::TokenStream, quote::{quote_spanned, ToTokens}, syn::{Error, Lifetime, Type}, thunderdome::Index, }; use crate::{ cfg::{Cfg, Ir}, target::Target, CompileError, Spanned, }; /// A shim for parsing the root level of a macro invocation, so that a session type may be written /...
the_stack
use crate::contract::{execute, instantiate, query, reply, INITIAL_DEPOSIT_AMOUNT}; use crate::error::ContractError; use crate::response::MsgInstantiateContractResponse; use crate::state::{read_borrower_infos, read_state, store_state, State}; use crate::testing::mock_querier::mock_dependencies; use anchor_token::distri...
the_stack
use wasm_bindgen::prelude::*; use super::common::*; use super::matrix4::*; use super::quaternion::*; use super::vector3::*; #[wasm_bindgen] pub struct Quaternion2( pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, ); #[wasm_bindgen] impl Quaternion2 { #[wasm_...
the_stack
//! Contains reader which reads parquet data into arrow array. use crate::arrow::array_reader::{build_array_reader, ArrayReader, StructArrayReader}; use crate::arrow::schema::parquet_to_arrow_schema; use crate::arrow::schema::{ parquet_to_arrow_schema_by_columns, parquet_to_arrow_schema_by_root_columns, }; use cra...
the_stack
use crate::bitfield::*; use crate::file_ext::*; use crate::gpu::*; use anyhow::*; use std::convert::{TryFrom, TryInto}; use std::io::{Read, Seek, SeekFrom}; use std::path::Path; /* Let's talk about Switch's texture layout (only covers 2D texture here) On top of pixels, the smallest unit is a packet. A packet is alwa...
the_stack
#[doc(hidden)] pub mod bridge; mod diagnostic; pub use diagnostic::{Diagnostic, Level, MultiSpan}; use std::cmp::Ordering; use std::ops::{Bound, RangeBounds}; use std::path::PathBuf; use std::str::FromStr; use std::{error, fmt, iter, mem}; /// Determines whether proc_macro has been made accessible to the currently ...
the_stack
mod tests { use crate::fastfield::{AliveBitSet, FastFieldReader}; use crate::schema::IndexRecordOption; use crate::{ collector::TopDocs, schema::{Cardinality, TextFieldIndexing}, }; use crate::{core::Index, fastfield::MultiValuedFastFieldReader}; use crate::{ query::Query...
the_stack
//! Remotely authenticated vs. unauthenticated network end-points: //! --------------------------------------------------- //! A network end-point operates with remote authentication if it only accepts connections //! from a known set of peers (`trusted_peers`) identified by their network identity keys. //! This does n...
the_stack
use get_error; use pixels::Color; use rwops::RWops; use std::error; use std::error::Error; use std::ffi::NulError; use std::ffi::{CStr, CString}; use std::fmt; use std::marker::PhantomData; use std::os::raw::{c_int, c_long, c_uint}; use std::path::Path; use surface::Surface; use sys::ttf; use sys::SDL_Surface; bitflag...
the_stack
use std::collections::HashMap; use common_exception::ErrorCode; use common_exception::Result; use sqlparser::ast::Expr; use sqlparser::ast::Function; use sqlparser::ast::FunctionArg; use sqlparser::ast::FunctionArgExpr; use sqlparser::ast::Ident; use super::UDFFetcher; pub struct UDFTransformer; impl UDFTransformer...
the_stack
#![allow(non_camel_case_types, non_snake_case)] #![allow(dead_code)] use capi::sctypes::*; use capi::scdef::{GFX_LAYER, ELEMENT_BITMAP_RECEIVER}; use capi::scdom::HELEMENT; use capi::scbehavior::{MOUSE_BUTTONS, MOUSE_EVENTS, KEY_EVENTS, KEYBOARD_STATES}; #[repr(C)] #[derive(Copy, Clone)] #[derive(Debug, PartialOrd, ...
the_stack
// [x] PERF0001: handle select without grouping or windows easier. #[cfg(test)] mod test; use std::mem; use super::window::{self, Group, Window}; use crate::op::prelude::trickle::window::{GroupWindow, SelectCtx, Trait}; use crate::{errors::Result, SignalKind}; use crate::{op::prelude::*, EventIdGenerator}; use crate...
the_stack
use color_eyre::eyre::WrapErr; use color_eyre::Report; use fantoch::client::{KeyGen, Workload}; use fantoch::config::Config; use fantoch::id::ProcessId; use fantoch::planet::Planet; use fantoch_exp::{ ExperimentConfig, FantochFeature, PlacementFlat, Protocol, RunMode, SerializationFormat, Testbed, }; use fantoc...
the_stack
extern crate indexmap; extern crate timely; extern crate differential_dataflow; use std::io::{BufRead, BufReader}; use std::fs::File; use indexmap::IndexMap; use timely::progress::Timestamp; use timely::order::Product; use timely::dataflow::Scope; use timely::dataflow::scopes::ScopeParent; use differential_dataflow...
the_stack
use std; use std::ops::{Deref, DerefMut}; use std::ffi::CString; use std::io::Read; use std::fs::File; use std::path::PathBuf; use std::collections::HashSet; use std::convert::Into; use crate::core::{self, Result as OclCoreResult, Program as ProgramCore, Context as ContextCore, ProgramInfo, ProgramInfoResult, Pro...
the_stack
use log::info; use regex::Regex; use std::collections::HashMap; use std::ffi::OsStr; use std::path::PathBuf; use structopt::StructOpt; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::memory_buffer::MemoryBuffer; use inkwell::module::Linkage; use inkwell::module::Module; use inkwell::types::{...
the_stack
#![no_std] #![allow(unaligned_references)] #[macro_use] extern crate log; extern crate irq_safety; extern crate memory; extern crate ioapic; extern crate apic; extern crate pic; extern crate sdt; extern crate acpi_table; extern crate zerocopy; use core::mem::size_of; use memory::{MappedPages, PageTable, PhysicalAddre...
the_stack
#![deny(missing_docs)] //! A common handler for hanging_gets use thiserror::Error; /// Function used to determine whether a change should cause any parked watchers to return. type ChangeFunction<T> = Box<dyn Fn(&T, &T) -> bool + Send + Sync + 'static>; /// Trait that should be implemented to send data to the hangin...
the_stack
use core::convert::{TryFrom, TryInto}; use crate::encoding::*; use crate::tag::Tag; use crate::encoding::Encoding32 as E32; use crate::encoding::Encoding64 as E64; use crate::encoding::Encoding64Nanboxed as E64N; mod tablegen { use super::*; include!(concat!(env!("OUT_DIR"), "/term_encoding.rs")); impl...
the_stack
pub use raylib::prelude::*; const G: f32 = 400.0; const PLAYER_JUMP_SPD: f32 = 350.0; const PLAYER_HOR_SPD: f32 = 200.0; #[derive(Default)] struct Player { position: Vector2, speed: f32, can_jump: bool, } struct EnvItem { rect: Rectangle, blocking: bool, color: Color, } impl EnvItem { fn...
the_stack
use std::rc::Rc; use crate::domain::{AppClosure, Elim, Head, LiteralClosure, Spine, Type, Value}; use crate::syntax::{Item, Term}; use crate::{meta, prim, var, AppMode, Label}; /// Evaluate a primitive. pub fn eval_prim<'spine>( prims: &prim::Env, prim_name: &prim::Name, spine: &'spine [Elim], ) -> Result...
the_stack
use std::collections::HashMap; use std::rc::Rc; use crate::builtins::{Builtin, BuiltinClosure}; use crate::operations::{BinOp, OpKind}; use crate::semantics::nze::lazy; use crate::semantics::{ apply_any, normalize_hir, normalize_one_layer, squash_textlit, Binder, Hir, HirKind, NzEnv, NzVar, TyEnv, Type, Univer...
the_stack
use anyhow::{bail, Result}; use clap::{App, Arg}; use leftwm::{Config, Keybind, ThemeSetting}; use leftwm_core::config::Workspace; use leftwm_core::utils; use std::collections::HashMap; use std::convert::TryFrom; use std::fs; use std::os::unix::fs::PermissionsExt; use std::path::PathBuf; use xdg::BaseDirectories; #[to...
the_stack
use crate::boxed::Box; use crate::traits::*; use std::fmt::{self, Debug, Formatter}; use std::ops::{Deref, DerefMut}; /// A type for protecting variable-length secrets allocated on the heap. /// /// Heap-allocated secrets have distinct security needs from /// stack-allocated ones. They provide the following guarantee...
the_stack
const GCM_NB: usize = 4; const GCM_ACCEPTING_HEADER: usize = 0; const GCM_ACCEPTING_CIPHER: usize = 1; const GCM_NOT_ACCEPTING_MORE: usize = 2; const GCM_FINISHED: usize = 3; //const GCM_ENCRYPTING: usize = 0; //const GCM_DECRYPTING: usize = 1; use crate::bls::aes; use crate::bls::aes::AES; pub struct GCM { table...
the_stack
pub mod abstraction; pub mod account_data; pub mod admin; pub mod appservice; pub mod globals; pub mod key_backups; pub mod media; pub mod proxy; pub mod pusher; pub mod rooms; pub mod sending; pub mod transaction_ids; pub mod uiaa; pub mod users; use crate::{utils, Error, Result}; use abstraction::DatabaseEngine; us...
the_stack
use core::cell::UnsafeCell; use core::ops::{Deref, DerefMut}; use core::fmt; use core::sync::atomic::{AtomicU64}; use core::marker::PhantomData; use core::hint::spin_loop; use spin::*; use super::linux_def::QOrdering; //use super::super::asm::*; pub struct Spin; pub type QMutex<T> = Mutex<T>; pub type QMutexGuard<'a...
the_stack
use crate::crypto_provider::{ AsymmetricProviderKey, CryptoProvider, CryptoProviderError, ProviderKey, SealingProviderKey, }; use fidl_fuchsia_kms::{AsymmetricKeyAlgorithm, KeyProvider}; use mundane::hash::*; use mundane::public::ec::ecdsa::EcdsaHash; use mundane::public::ec::*; use mundane::public::rsa::*; use mun...
the_stack
use cgmath::{Matrix3, Matrix4}; use util::bits::BitField; use util::cur::Cur; use util::fixed::{fix16, fix32}; use nitro::Name; use nitro::rotation::{pivot_mat, basis_mat}; use std::ops::{Mul, Add}; use errors::Result; pub struct Animation { pub name: Name, pub num_frames: u16, pub objects_curves: Vec<TRSC...
the_stack
use dodrio::bumpalo; use iced_web::{css, Background, Bus, Color, Css, Element, Length, Widget}; pub use crate::style::card::{Style, StyleSheet}; const DEFAULT_PADDING: f32 = 10.0; /// A card consisting of a head, body and optional foot. /// /// # Example /// ``` /// # use iced_aw::Card; /// # use iced_web::Text; ///...
the_stack
#[macro_use] extern crate assert_float_eq; use ocelotter_runtime::constant_pool::*; use ocelotter_runtime::interp_stack::InterpEvalStack; use ocelotter_runtime::klass_repo::SharedKlassRepo; use ocelotter_runtime::otklass::OtKlass; use ocelotter_runtime::otmethod::OtMethod; use ocelotter_runtime::*; mod opcode; pub f...
the_stack
use std::collections::HashSet; pub use termion::event::{Event, Key, MouseButton, MouseEvent}; use termion::input::{EventsAndRaw, TermReadEventsAndRaw}; use std::io; /// A structure corresponding to a single input event, e.g., a single keystroke or mouse event. /// /// In addition to the semantic Event enum itself, th...
the_stack
use std::collections::HashSet; use engine::{Color, Transform}; use utils::{log_fmt, random, random_range}; mod tile; pub use self::tile::Tile; pub struct WorldState { pub debug: bool, pub window_width: u32, pub window_height: u32, pub width: u32, pub height: u32, pub quality: u32, pub til...
the_stack
use std::cmp::min; use std::convert::TryFrom; #[cfg(test)] use std::sync::{Arc, Mutex}; use bytes::buf::UninitSlice; use bytes::{Buf, BufMut}; use dfn_core::stable; /// A trait for stable memory operations, to allow testing. trait StableMemory { /// Write `content` to `offset` in stable memory fn write(&mut...
the_stack
use crate::math::{Isometry, Point, Real, Vector}; use crate::query::contact_manifolds::ContactManifoldsWorkspace; use crate::query::query_dispatcher::PersistentQueryDispatcher; use crate::query::{ self, details::NonlinearTOIMode, ClosestPoints, Contact, ContactManifold, NonlinearRigidMotion, QueryDispatcher, Un...
the_stack
use crate::conn; use crate::ui::UI; use libtiny_common::ChanName; use libtiny_tui::test_utils::expect_screen; use libtiny_tui::TUI; use libtiny_wire::{Cmd, Msg, MsgTarget, Pfx}; use term_input; use termbox_simple::CellBuf; use libtiny_client as client; use term_input as input; use std::future::Future; use std::panic:...
the_stack
use criterion::{black_box, criterion_group, criterion_main, Criterion}; use itertools::Itertools; use itertools::free::cloned; use itertools::iproduct; use std::iter::repeat; use std::cmp; use std::ops::{Add, Range}; mod extra; use crate::extra::ZipSlices; fn slice_iter(c: &mut Criterion) { let xs: Vec<_> = rep...
the_stack
use crate::{ commands::gdb_server::GdbServer, gdb_connection::GdbRegisterValue, gdb_register::GdbRegister, remote_ptr::RemotePtr, session::task::{task_common::read_val_mem, Task}, }; use std::{convert::TryFrom, intrinsics::transmute, mem::size_of}; use Opcode::*; /// Extracted from /// <https://sou...
the_stack
#[allow(missing_docs)] // documentation missing in model #[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct UpdateLongTermPricingOutput {} impl std::fmt::Debug for UpdateLongTermPricingOutput { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut formatter...
the_stack
//! **MOPA: My Own Personal Any.** A macro to implement all the `Any` methods on your own trait. //! //! You like `Any`—its ability to store any `'static` type as a trait object and then downcast it //! back to the original type is very convenient, and in fact you need it for whatever misguided //! reason. But it’s not...
the_stack
// `MeshBuffer`s must convert and sum indices into their vertex data. Some of // these conversions may fail, but others are never expected to fail, because of // invariants enforced by `MeshBuffer`. // // Index types require `Unsigned` and `Vec` capacity is limited by word size // (the width of `usize`). An overflow ca...
the_stack
pub mod component; use { fidl_fuchsia_component_runner as fcrunner, fidl_fuchsia_data as fdata, std::path::Path, thiserror::Error, }; const ARGS_KEY: &str = "args"; const BINARY_KEY: &str = "binary"; const ENVIRON_KEY: &str = "environ"; /// An error encountered operating on `ComponentStartInfo`. #[derive(Deb...
the_stack
//! Playground of SCD bounty targets. use super::utils; use wedpr_l_utils::error::WedprError; extern crate wedpr_s_selective_certificate_disclosure; use wedpr_s_selective_certificate_disclosure::{issuer, user, verifier}; extern crate wedpr_s_protos; use wedpr_s_protos::generated::scd::{ AttributeDict, CertificateS...
the_stack
use glib::prelude::*; use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; use std::convert::TryInto; use std::ffi::CString; use std::os::raw::c_char; use std::sync::Mutex; pub use gstreamer_rtp::rtp_buffer::compare_seqnum; pub use gstreamer_rtp::rtp_buffer::RTPBuffer; pub use gstreame...
the_stack
use crate::prelude::*; #[test] fn iter() { let bits = bits![0, 1, 0, 1, 0, 1]; let mut iter = bits.iter().by_refs(); assert!(!*iter.next().unwrap()); assert!(!*iter.nth(1).unwrap()); assert!(*iter.next_back().unwrap()); assert!(*iter.nth_back(1).unwrap()); assert_eq!(iter.len(), 0); assert!(iter.next().is_no...
the_stack
extern crate argparse; extern crate html2text; #[cfg(unix)] extern crate termion; #[cfg(unix)] extern crate unicode_width; #[cfg(unix)] mod top { use ::html2text; use ::std; use ::termion; use argparse::{ArgumentParser, Store}; use html2text::render::text_renderer::{RichAnnotation, TaggedLine, Tagge...
the_stack
#![allow(non_snake_case)] #[macro_use] extern crate vst; use std::cmp::Ordering; use std::sync::Arc; use vst::buffer::AudioBuffer; use vst::plugin::{Category, Info, Plugin, PluginParameters}; use vst::util::ParameterTransfer; const BASE_SAMPLE_RATE: f32 = 44100.0; const DELAY_STEP: f32 = 256f32 / BASE_SAMPLE_RATE; ...
the_stack
use std::collections::VecDeque; use std::future::Future; use std::pin::Pin; use std::sync::{Arc, Mutex}; use std::task::{Context, Poll, Waker}; use crate::message::Message; /// The `MessageMailbox` is a data structure holding all messages of a process. /// /// If a `Signal` of type `Message` is received it will be ta...
the_stack
#[cfg(any( feature = "rocks_engine", all(feature = "rocks_engine", feature = "sled_engine"), all(not(feature = "rocks_engine"), not(feature = "sled_engine")), ))] mod rocks_db; #[cfg(all(feature = "sled_engine", not(feature = "rocks_engine")))] mod sled_db; ////////////////////////////////////////////////...
the_stack
use atelier_assets::loader::{ crossbeam_channel::Sender, handle::{AssetHandle, RefOp, TypedAssetStorage}, AssetLoadOp, AssetStorage, AssetTypeId, LoadHandle, LoaderInfoProvider, TypeUuid, }; use mopa::{mopafy, Any}; use std::{sync::Mutex, collections::HashMap, error::Error}; use atelier_assets::core::Asset...
the_stack
// // Copyright (c) 2018 Stegos AG // // 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 restriction, including without limitation the rights // to use, copy, modify, merge, publish, ...
the_stack
use regex::Regex; use std::error::Error; use std::ffi::OsStr; use std::fs::File; use std::fs::OpenOptions; use std::io::Write; use std::io::{BufRead, BufReader}; use std::path::{Path, PathBuf}; use std::process::Command; use std::{thread, time}; use clap::ArgMatches; use remove_dir_all::remove_dir_all; use simple_erro...
the_stack
use async_trait::async_trait; use color_eyre::{eyre::bail, Report, Result}; use thiserror::Error; use ethers::core::types::H256; use futures_util::future::{join, join_all, select_all}; use std::{collections::HashMap, fmt::Display, sync::Arc, time::Duration}; use tokio::{ sync::{mpsc, oneshot, RwLock}, task::Jo...
the_stack
use super::{ElfResult, ElfWord}; use core::{convert, fmt, ops}; use core::iter::IntoIterator; use memory::{Addr, PAddr}; // Distinguished section indices. pub const SHN_UNDEF: u16 = 0; pub const SHN_LORESERVE: u16 = 0xff00; pub const SHN_LOPROC: u16 = 0xff00; pub const SHN_HIPROC: u16 = 0xff1f;...
the_stack
use proc_macro2::{Ident, TokenStream}; use quote::quote; use std::collections::{HashMap, HashSet}; use syn::parse::ParseBuffer; use syn::spanned::Spanned; #[derive(Debug)] pub struct Class { pub name: Ident, pub has_class_factory: bool, pub docs: Vec<syn::Attribute>, pub visibility: syn::Visibility, ...
the_stack
use std::convert::TryFrom; use std::ffi::OsString; use std::io; use std::marker::PhantomData; use std::mem; use std::os::raw::c_void; use std::os::windows::ffi::OsStringExt; use std::path::PathBuf; use std::ptr; use ntapi::{ntpebteb, ntpsapi, ntrtl, ntwow64}; use winapi::ctypes::wchar_t; use winapi::shared::minwindef:...
the_stack
use core::mem::MaybeUninit; use apdu_dispatch::interchanges; use embedded_time::duration::Milliseconds; use heapless::Vec; use interchange::Requester; use crate::traits::nfc; pub enum SourceError { NoActivity, } /// Returned by `.poll()`. This returns a potential duration that /// should be used to call `.poll...
the_stack
use crate::info::{ types_interner::{EntityType, InstanceType, Type, TypeId}, Module, ModuleContext, }; use crate::stack_ext::StackExt; use anyhow::{Context, Result}; use std::convert::TryFrom; use wasm_encoder::SectionId; use wasmparser::{SectionReader, SectionWithLimitedItems}; struct StackEntry { parser:...
the_stack
use crate::core::condition::Condition; use crate::core::register::{ExtensionReg, Reg}; use crate::core::thumb::ThumbCode; use enum_set::EnumSet; #[derive(Debug, PartialEq, Copy, Clone)] /// /// Types of shift operations supported pub enum SRType { /// logical shift left LSL, /// logical shift right LSR...
the_stack
use serde::{Deserialize, Serialize}; use tornado_common_api::{Payload, Value}; use tornado_executor_common::ExecutorError; use tornado_executor_director::{DirectorAction, DirectorActionName}; use tornado_executor_icinga2::Icinga2Action; use tornado_common_api::ValueExt; const PROCESS_CHECK_RESULT_SUBURL: &str = "proce...
the_stack
use std::net::TcpStream; use std::io; use std::fmt; use std::error; use http::{HttpScheme, HttpResult, StreamId, Header, HttpError, ErrorCode}; use http::transport::TransportStream; use http::frame::{SettingsFrame, HttpSetting, FrameIR, PingFrame}; use http::connection::{SendFrame, ReceiveFrame, SendStatus, HttpConnec...
the_stack
use std::{path::Path, process::Command}; use clap::Args; use color_eyre::Section; use cross::CommandExt; use std::fmt::Write; #[derive(Args, Debug)] pub struct BuildDockerImage { #[clap(long, hide = true, env = "GITHUB_REF_TYPE")] ref_type: Option<String>, #[clap(long, hide = true, env = "GITHUB_REF_NAME"...
the_stack
extern crate graph_map; use std::sync::Arc; use graph_map::GraphMMap; struct GraphMap { map: GraphMMap, reverse: Vec<u32>, } impl GraphMap { pub fn new(filename: &str) -> Self { let map = GraphMMap::new(filename); let mut reverse = vec![0; map.nodes()]; for node in 0 .. map.node...
the_stack
use af::{Array, Dim4, HasAfEnum, DType}; use std::default::Default; use num::Complex; use rand; use rand::Rng; //use itertools::Zip; use std::sync::{Arc, Mutex}; use utils; use initializations; use device::{Device, DeviceManager}; //use error::HAL Error; macro_rules! set_param_vec_func { ($fn_name: ident, $vec_ext...
the_stack
use super::*; impl World { pub fn biscuit_create(table: &mut SymbolTable, mut authority_facts: Vec<Fact>, mut authority_rules: Vec<Rule>, mut ambient_facts: Vec<Fact>, ambient_rules: Vec<Rule>) -> World { let mut w = World::new(); let authority_index = table.insert("authority"); let ambient_index...
the_stack
use std::fmt::Debug; use lyon_geom::{ euclid::{default::Transform2D, Angle}, point, vector, ArcFlags, CubicBezierSegment, Point, QuadraticBezierSegment, SvgArc, Vector, }; use crate::arc::Transformed; mod g_code; mod preprocess; pub use self::g_code::GCodeTurtle; pub use preprocess::PreprocessTurtle; pub tr...
the_stack
use crate::iter::plumbing::*; use crate::iter::*; use std::char; use std::ops::RangeInclusive; /// Parallel iterator over an inclusive range, implemented for all integer types and `char`. /// /// **Note:** The `zip` operation requires `IndexedParallelIterator` /// which is only implemented for `u8`, `i8`, `u16`, `i16`...
the_stack
use std::{ any::Any, cell::RefCell, fmt::Write, ops::Try, panic::{ catch_unwind, UnwindSafe, }, sync::atomic::{ AtomicU32, Ordering, }, }; use failure::Fail; use crate::std_ext::prelude::*; static LAST_ERR_ID: AtomicU32 = AtomicU32::new(0); fn next_err...
the_stack
use anyhow::{anyhow, Result}; // Request for "any CID" pub const VSOCK_CID_ANY_STR: &str = "any"; // Numeric equivalent to VSOCK_CID_ANY_STR pub const VSOCK_CID_ANY: u32 = libc::VMADDR_CID_ANY; pub const ERR_VSOCK_PORT_EMPTY: &str = "VSOCK port cannot be empty"; pub const ERR_VSOCK_PORT_NOT_NUMERIC: &str = "VSOCK por...
the_stack
use crate::files_api; use crate::storage; use crate::util::read_to_serde_json; use crate::ARGS_STRUCT; use notify::{raw_watcher, RawEvent, RecursiveMode, Watcher}; use std::env; use std::path::{Path, PathBuf}; use std::sync::mpsc::channel; use url::Url; extern crate path_absolutize; use path_absolutize::*; #[derive(se...
the_stack
pub mod aggregate; pub mod carbon; pub mod config; pub mod consul; pub mod errors; pub mod management; pub mod peer; pub mod raft; pub mod server; pub mod stats; pub mod task; pub mod udp; pub mod util; use std::collections::HashMap; use std::io; use std::str::FromStr; use std::sync::atomic::{AtomicBool, Ordering}; us...
the_stack
//! Geometry data types //! //! [`Coord`], [`Size`] and [`Offset`] are all integer (`i32`) types used for //! widget UI layout, representing positions, sizes and scroll deltas //! respectively. //! //! [`Vec2`] is a floating-point (`f32`) type used mainly for screen-space //! position during rendering. //! //! Conversi...
the_stack
use std::{fmt, str::FromStr}; use base::datetimes::TimeZoneId; use serde_derive::{Deserialize, Serialize}; use serde_json::{json, Value, Value::String as VString}; use crate::error::{ArrowError, Result}; use super::Field; /// The set of datatypes that are supported by this implementation of Apache Arrow. /// /// Th...
the_stack