text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
//! WebAssembly trap handling, which is built on top of the lower-level //! signalhandling mechanisms. use super::trapcode::TrapCode; use crate::vmcontext::{VMFunctionBody, VMFunctionEnvironment, VMTrampoline}; use backtrace::Backtrace; use std::any::Any; use std::cell::{Cell, UnsafeCell}; use std::error::Error; use s...
the_stack
#![warn(missing_docs)] use crate::{chunk, encoder, DecodingError, EncodingError}; use deflate::{write::ZlibEncoder, Compression}; use miniz_oxide::inflate::{decompress_to_vec_zlib, decompress_to_vec_zlib_with_limit}; use std::{convert::TryFrom, io::Write}; /// Default decompression limit for compressed text chunks. p...
the_stack
extern crate core; extern crate alloc; #[macro_use] pub mod tuple_match; #[macro_use] pub mod tuple_gen; use core::mem::MaybeUninit; use core::convert::TryInto; use alloc::vec::Vec; use alloc::sync::Arc; use alloc::boxed::Box; use alloc::string::String; use alloc::borrow::{Cow, ToOwned}; use alloc::collections::VecDe...
the_stack
use std::convert::TryInto; use std::ops::AddAssign; use ff::PrimeField; use group::{prime::PrimeCurveAffine, Curve, Group}; use rayon::prelude::*; pub const WINDOW_SIZE: usize = 8; /// Abstraction over either a slice or a getter to produce a fixed number of scalars. pub enum ScalarList<'a, G: PrimeCurveAffine, F: Fn...
the_stack
use bitcoin::blockdata::block::{Block, BlockHeader}; use bitcoin::blockdata::transaction::Transaction; use bitcoin::blockdata::script::Script; use bitcoin::blockdata::constants::genesis_block; use bitcoin::util::hash::BitcoinHash; use bitcoin::network::constants::Network; use bitcoin::hash_types::{Txid, BlockHash}; us...
the_stack
use std::path::PathBuf; use std::time::{Duration, SystemTime}; use anyhow::Result; use slog::{self, error}; use common::util; use model::{self, Model}; use crate::{DataFrame, Direction, LocalStore, RemoteStore, Store}; /// A SamplePackage consists of enough information to construct a Model. // A SamplePackage consi...
the_stack
use crypto::wrapping::*; macro_rules! choose_impl { ($s: ident, $t:ty, $($a:expr)+) => ( impl $s { fn choose(flag: $t, a: &$s, b: &$s) -> $s { $s { v: [ $( a.v[$a] ^ (flag * (a.v[$a] ^ b.v[$a])), ...
the_stack
#[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct User { /// <p>The ID of the user.</p> pub id: std::option::Option<std::string::String>, /// <p>The login name of the user.</p> pub username: std::option::Option<std::string::String>, /// <p>The email address of the user.<...
the_stack
mod config; mod validators; use { anyhow::{format_err, Error}, config::{Config, ConfigContext, FactoryConfig}, fidl::endpoints::{create_proxy, ProtocolMarker, Request, RequestStream, ServerEnd}, fidl_fuchsia_boot::FactoryItemsMarker, fidl_fuchsia_factory::{ AlphaFactoryStoreProviderMarker, ...
the_stack
use super::{compile_shader, link_program, reflect_layout, Gl}; use crate::{ converters::*, gl_call, Buffer, Device, GlBufferInfo, GlShader, GlVertexBufferDescripror, WebGL2Pipeline, WebGL2RenderResourceBinding, WebGL2Resources, }; use bevy::asset::{Assets, Handle, HandleUntyped}; use bevy::log::prelude::*; use ...
the_stack
use std::sync::Arc; use std::thread; use std::time::Duration; // External use actix_web::dev::ServiceRequest; use actix_web::{web, App, HttpResponse, HttpServer}; use actix_web_httpauth::extractors::{ bearer::{BearerAuth, Config}, AuthenticationError, }; use actix_web_httpauth::middleware::HttpAuthentication; u...
the_stack
use super::*; use serde_json::json; #[test] fn test_results_good() { let mut mock = MockStream::default(); mock.write.set_input(LOG_VERSION_COMMAND.to_vec()); let mut output = LOG_RESPONSE_GOOD.to_vec(); output.extend_from_slice(&VERSION_LOG); mock.read.set_output(output); let service = serv...
the_stack
use std::{ borrow::Borrow, collections::HashMap, fmt::Display, io, path::{Path, PathBuf}, result, sync::{ atomic::{AtomicBool, AtomicPtr, AtomicUsize, Ordering}, Arc, RwLock as SyncRwLock, }, time::Duration, }; use engine_traits::{CfName, CF_DEFAULT, CF_LOCK, CF_WRIT...
the_stack
mod auxiliary; use std::env; use auxiliary::{cargo_bin_exe, cargo_hack, target_triple, CommandExt, SEPARATOR}; #[test] fn failures() { cargo_bin_exe().assert_failure("real"); cargo_bin_exe() .arg("--all") .assert_failure("real") .stderr_contains("expected subcommand 'hack', found arg...
the_stack
use { crate::{ env::VarKind, ident::Ident, ident::IdentPath, lit::Lit, shaderast::*, span::Span, ty::{Ty, TyExpr, TyLit}, util::PrettyPrintedFloat, val::Val, }, std::{ cell::{Cell, RefCell}, fmt::Write, }, }; pub(cr...
the_stack
#![deny(missing_docs)] //! A decoder for the XDV and SPX file formats used by Tectonic and XeTeX. //! //! Both of these file formats are derived from the venerable “device //! independent” (DVI) format used by TeX. The XDV format (name presumably //! meaning something like “XeTeX DVI” or “extended DVI”) adds a few cod...
the_stack
use m3u8_rs::*; use nom::AsBytes; use std::collections::HashMap; use std::fs; use std::fs::File; use std::io::Read; use std::path; fn all_sample_m3u_playlists() -> Vec<path::PathBuf> { let path: std::path::PathBuf = ["sample-playlists"].iter().collect(); fs::read_dir(path.to_str().unwrap()) .unwrap() ...
the_stack
use std::collections::{BTreeMap, HashMap}; use std::convert::TryInto; use std::mem; use abci::*; use log::{info, warn}; use parity_scale_codec::{Decode, Encode}; use protobuf::Message; use serde::{Deserialize, Serialize}; use crate::enclave_bridge::EnclaveProxy; use crate::staking::StakingTable; use chain_core::commo...
the_stack
use std::collections::BTreeMap; use std::convert::TryInto; use std::ops::Bound::Included; use std::sync::{Arc, Weak}; use base::{error, Event, RawDescriptor}; use sync::Mutex; use crate::pci::pci_configuration::{ PciBarConfiguration, PciBridgeSubclass, PciClassCode, PciConfiguration, PciHeaderType, HEADER_TYP...
the_stack
use crate::{I18nAssets, I18nEmbedError, LanguageLoader}; pub use i18n_embed_impl::fluent_language_loader; use fluent::{bundle::FluentBundle, FluentArgs, FluentMessage, FluentResource, FluentValue}; use fluent_syntax::ast::{self, Pattern}; use intl_memoizer::concurrent::IntlLangMemoizer; use parking_lot::RwLock; use s...
the_stack
use crate::cuda::CUresult; use crate::{ cuda::{CUcontext, CUdevice, CUmodule, CUuuid}, cuda_impl, }; use super::{context, context::ContextData, device, module, Decuda, Encuda, GlobalState}; use std::os::raw::{c_uint, c_ulong, c_ushort}; use std::{ ffi::{c_void, CStr}, ptr, }; use std::{mem,...
the_stack
use std::convert::TryInto; use std::env; use std::fmt; use std::io; use std::pin::Pin; use std::process::Stdio; use std::task::{Poll, Context}; use std::time::Duration; use std::thread::sleep; use failure::Fail; use humantime; use once_cell::sync::Lazy; use tokio::io::{AsyncBufReadExt, AsyncRead, AsyncWrite, BufReader...
the_stack
use crate::logger::Logger; use crate::rpcclient::RpcClient; use crate::{ language_client::LanguageClient, utils::{code_action_kind_as_str, ToUrl}, vim::Vim, watcher::FSWatch, }; use crate::{viewport::Viewport, vim::Highlight}; use anyhow::{anyhow, Result}; use jsonrpc_core::Params; use log::*; use lsp_t...
the_stack
use bytes::{Buf, Bytes}; use futures::ready; use h3::quic::{self, Error, StreamId, WriteBuf}; use s2n_quic::stream::{BidirectionalStream, ReceiveStream}; use s2n_quic_core::varint::VarInt; use std::{ convert::TryInto, fmt::{self, Display}, sync::Arc, task::{self, Poll}, }; pub struct Connection { c...
the_stack
#![type_length_limit = "600000000"] //#![feature(type_alias_impl_trait)] #[macro_use] mod util; mod config; mod edit; mod edit_camera_view; mod exec; mod game; mod input_state; mod machine; mod render; use std::fs::File; use std::io::BufReader; use std::thread; use std::time::{Duration, Instant}; use clap::{App, Ar...
the_stack
use crate::demangling::try_cpp_demangle; use crate::error::Error; use llvm_ir::module::{GlobalAlias, GlobalVariable}; use llvm_ir::types::{FPType, NamedStructDef, Type}; use llvm_ir::{Function, Module}; use log::{info, warn}; use rustc_demangle::demangle; use std::convert::TryInto; use std::fs::DirEntry; use std::io; u...
the_stack
use std::io::{self, BufReader, Read, Seek, SeekFrom}; use crate::common::{ engine, model::{ModelFlags, SyncType}, util::read_f32_3, }; use byteorder::{LittleEndian, ReadBytesExt}; use cgmath::{ElementWise as _, Vector3}; use chrono::Duration; use num::FromPrimitive; use thiserror::Error; pub const MAGIC:...
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 std::collections::BTreeMap; use std::fmt; use crate::MemberVariableResolution; use crate::error::*; use crate::sym::{Sym, Seg, Symbol}; use std::hash::{Hash, Hasher}; pub use spirv_headers::{Dim, ImageFormat}; #[derive(PartialEq, Eq, Hash, Clone)] pub enum ScalarType { // Be careful with booleans. Booleans is...
the_stack
use latticeclient::Client; use std::error::Error; pub(crate) fn lattice_single_host() -> Result<(), Box<dyn Error>> { use std::time::Duration; use wascc_host::{Host, HostBuilder}; let host = HostBuilder::new() .with_label("integration", "test") .with_label("hostcore.arch", "FOOBAR") ...
the_stack
pub struct DescribeTapeArchivesPaginator< C = aws_smithy_client::erase::DynConnector, M = crate::middleware::DefaultMiddleware, R = aws_smithy_client::retry::Standard, > { handle: std::sync::Arc<crate::client::Handle<C, M, R>>, builder: crate::input::describe_tape_archives_input::Builder, } impl<C,...
the_stack
use accesskit::{ActionHandler, NodeId, TreeUpdate}; use lazy_static::lazy_static; use parking_lot::{const_mutex, Condvar, Mutex}; use std::{cell::RefCell, rc::Rc, sync::Arc, time::Duration}; use windows as Windows; use windows::{ core::*, Win32::{ Foundation::*, Graphics::Gdi::ValidateRect, ...
the_stack
use super::prelude::*; /// Internal representation of Arrow `FieldNode` Message #[derive(Debug, Clone)] pub struct Node { /// Number of value slots (if Node is the base column node, then it is the number of items in /// column) pub length: usize, pub null_count: usize, } static NULL_NODE: Node = Node ...
the_stack
use std::mem; use std::cmp::Ordering; extern crate flatbuffers; use self::flatbuffers::EndianScalar; #[allow(unused_imports, dead_code)] pub mod marauder { use std::mem; use std::cmp::Ordering; extern crate flatbuffers; use self::flatbuffers::EndianScalar; #[allow(unused_imports, dead_code)] pub mod strokes...
the_stack
use core::{mem, str}; use core::str::FromStr; use core::sync::atomic::{AtomicUsize, Ordering}; use alloc::collections::BTreeMap; use alloc::vec::Vec; use alloc::string::String; use spin::{Mutex, RwLock}; use crate::arch::interrupt::{available_irqs_iter, bsp_apic_id, is_reserved, set_reserved}; use crate::event; use...
the_stack
use std::cmp::Ordering; use indexmap::{IndexMap, IndexSet}; use crate::generator::{Rect, RoomParams}; use sulis_core::util::{Point, ReproducibleRandom}; #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum TileKind { Wall, Corridor(usize), Room { region: usize, transition: bool }, DoorWay, } #[deri...
the_stack
use llvm_sys; use std::ffi::CString; use crate::error::*; use self::llvm_sys::core::*; use self::llvm_sys::prelude::*; use self::llvm_sys::LLVMIntPredicate::*; use self::llvm_sys::LLVMTypeKind; use crate::codegen::llvm2::intrinsic::Intrinsics; use crate::codegen::llvm2::llvm_exts::*; use crate::codegen::llvm2::Code...
the_stack
#![doc(html_root_url = "https://docs.rs/amadeus-derive/0.4.3")] #![recursion_limit = "400"] #![warn( missing_copy_implementations, missing_debug_implementations, missing_docs, trivial_numeric_casts, unused_import_braces, unused_qualifications, unused_results, unreachable_pub, clippy::pedantic )] #![allow( cli...
the_stack
use std::cell::RefCell; use std::collections::{HashMap, HashSet}; use std::rc::Rc; use std::sync::{Arc, RwLock}; use co::{IBackend, SharedTensor}; use layer::*; use util::{ArcLock, LayerOps}; use leaf_capnp::sequential_config as capnp_config; use leaf_capnp::shaped_input as capnp_shaped_input; use capnp_util::*; #[der...
the_stack
use std::error::Error; use std::fmt; use async_trait::async_trait; use rusoto_core::credential::ProvideAwsCredentials; use rusoto_core::region; use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest}; use rusoto_core::{Client, RusotoError}; use rusoto_core::param::{Params, ServiceParams}; use rusoto_c...
the_stack
This crate provides the `macro_attr!` macro that enables the use of custom, macro-based attributes and derivations. Supercedes the `custom_derive` crate. <style type="text/css"> .link-block { font-family: "Fira Sans"; } .link-block > p { display: inline-block; } .link-block > p > strong { font-weight: 500; margin-rig...
the_stack
extern crate log; #[macro_use] extern crate lazy_static; extern crate clap; extern crate lib_opnfi; extern crate regex; extern crate simple_logger; use crate::config::Config; use crate::net::nameservers::get_nameservers; use crate::util::*; use lib_opnfi::inform::payload::gateway::OpnFiInformGatewayPayload; use lib_op...
the_stack
use std::default::Default; use std::path::Path; use collada; use gfx; use gfx::memory::Typed; use gfx::traits::*; use gfx_texture; use gfx_texture::TextureContext; use math::*; use skeleton::Skeleton; use transform::Transform; const MAX_JOINTS: usize = 64; pub struct SkinnedRenderBatch<R: gfx::Resources, T: Transf...
the_stack
use super::ast::Ast; use super::class::{Class, Obj}; use super::code::{Bytecode, Coro, GFn, Instr, ParamMap}; use super::collections::{Arr, DequeAccess, DequeOps, Str, Tab}; use super::engine::{glsp, stock_syms::*, RData, RFn, Span, Sym}; use super::error::GResult; use super::eval::Expander; use super::gc::{Allocate, R...
the_stack
use crate::{ debug_ignore::DebugIgnore, errors::FeatureGraphWarning, graph::{ feature::{build::FeatureGraphBuildState, Cycles, FeatureFilter, FeatureList}, DependencyDirection, FeatureIx, PackageGraph, PackageIx, PackageLink, PackageMetadata, }, petgraph_support::{scc::Sccs, topo::To...
the_stack
use library::{Library, Taxonomy}; use std::collections::HashMap; use std::path::PathBuf; use std::sync::{Arc, RwLock}; use tera::{from_value, to_value, Function as TeraFn, Result, Value}; use utils::slugs::{slugify_paths, SlugifyStrategy}; #[derive(Debug)] pub struct GetTaxonomyUrl { taxonomies: HashMap<String, Ha...
the_stack
mod boringssl_wrapper; mod keysafe; use self::boringssl_wrapper::*; use self::keysafe::*; use crate::crypto_provider::{ AsymmetricProviderKey, CryptoProvider, CryptoProviderError, ProviderKey, SealingProviderKey, }; use crate::tee::*; use boringssl_sys::{NID_X9_62_prime256v1, NID_secp384r1, NID_secp521r1}; use byt...
the_stack
use std::collections::{HashMap, HashSet}; use std::fmt::Debug; use std::hash::Hash; use std::iter::Iterator; use std::ops::Deref; use std::sync::Arc; /// There are two hierarchies that this trait is used for: /// * commands -> jobs -> steps form the tree structure, using `Command::jobs` and `Job<_>::steps` fields /// ...
the_stack
use super::error::SourceError; pub use super::lexer::Token; use std::error::Error; use std::fmt; use std::ops::Range; pub type ParseError = SourceError<ParseErrorKind, ContextLevel>; pub type ParseRes<T> = Result<T, ParseError>; /// An error that occured during parsing #[derive(Debug)] pub enum ParseErrorKind { U...
the_stack
use crate::crh::TwoToOneCRHSchemeGadget; use crate::merkle_tree::{Config, IdentityDigestConverter}; use crate::{CRHSchemeGadget, Path}; use ark_ff::Field; use ark_r1cs_std::alloc::AllocVar; use ark_r1cs_std::boolean::Boolean; #[allow(unused)] use ark_r1cs_std::prelude::*; use ark_r1cs_std::ToBytesGadget; use ark_relati...
the_stack
use crate::dimension::slices_intersect; use crate::error::{ErrorKind, ShapeError}; use crate::{ArrayViewMut, DimAdd, Dimension, Ix0, Ix1, Ix2, Ix3, Ix4, Ix5, Ix6, IxDyn}; use alloc::vec::Vec; use std::convert::TryFrom; use std::fmt; use std::marker::PhantomData; use std::ops::{Deref, Range, RangeFrom, RangeFull, RangeI...
the_stack
use super::{ElemFrom, Group, UnknownOrderGroup}; use crate::util; use crate::util::{int, TypeRep}; use rug::{Assign, Integer}; use std::hash::{Hash, Hasher}; use std::str::FromStr; #[allow(clippy::module_name_repetitions)] #[derive(Clone, Debug, PartialEq, Eq, Hash)] /// Class group implementation, with future optimiz...
the_stack
use crate::{AfErr, DeviceControl}; use regex::Regex; use std::convert::TryFrom; use std::ops::Index; const FILE_NAME: &'static str = "\\\\.\\ATKACPI"; const CONTROL_CODE: u32 = 2237452; const POWER_PLAN_TEMPLATE: [u8; 16] = [ 0x44, 0x45, 0x56, 0x53, 0x08, 0x00, 0x00, 0x00, 0x75, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,...
the_stack
mod support; use cgmath; use glam; use mathbench::mint_support::*; use nalgebra; use rand_pcg::Pcg64Mcg; const NUM_ITERS: usize = 1024; #[macro_export] macro_rules! semi_implicit_euler { ($delta_secs: expr, $accel: expr, $vel: expr, $pos: expr) => {{ for ((position, acceleration), velocity) in ...
the_stack
use crate::teams::Owners; use regex::Regex; use std::{ collections::{BTreeMap, BTreeSet}, ops::{Deref, DerefMut}, }; use super::Result; use crate::config::SlackParameters; /// Legacy contact data /// /// This property is being phased out in favour of .maintainer #[derive(Serialize, Deserialize, Clone, Debug)]...
the_stack
use casper_engine_test_support::{ internal::{ ExecuteRequestBuilder, InMemoryWasmTestBuilder, DEFAULT_ACCOUNT_PUBLIC_KEY, DEFAULT_RUN_GENESIS_REQUEST, }, DEFAULT_ACCOUNT_ADDR, MINIMUM_ACCOUNT_CREATION_BALANCE, }; use casper_execution_engine::core::{ engine_state::Error as CoreError, exec...
the_stack
extern crate biscuit_auth as biscuit; use biscuit::error; use biscuit::KeyPair; use biscuit::{builder::*, Biscuit}; use prost::Message; use rand::prelude::*; use serde::Serialize; use std::{ collections::{BTreeMap, BTreeSet}, convert::TryInto, fs::File, io::Write, time::*, }; fn main() { let m...
the_stack
#[cfg(feature = "dist-client")] pub use self::client::Client; #[cfg(feature = "dist-worker")] pub use self::worker::Worker; #[cfg(feature = "dist-worker")] pub use self::worker::{ CoordinatorAuthCheck, CoordinatorVisibleMsg, Scheduler, WorkerAuthCheck, HEARTBEAT_TIMEOUT, }; mod common { #[cfg(any(feature = "di...
the_stack
//! Storage-related abstractions and commands. use async_trait::async_trait; use serde::Deserialize; #[cfg(test)] use serde::Serialize; use std::collections::{BTreeMap, HashMap}; use std::fmt::{self}; use std::io; use std::path::PathBuf; use std::str; mod cmds; pub use cmds::*; mod fs; pub use fs::*; mod mem; pub use...
the_stack
extern crate std; extern crate libc; extern crate sync; extern crate avcodec = "avcodec55"; extern crate avutil = "avutil52"; extern crate avformat = "avformat55"; extern crate swscale = "swscale2"; extern crate kiss3d; // inspired by the muxing sample: http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html use li...
the_stack
use super::{NSComparisonResult, NSString, NSValue}; use crate::core::Arc; use crate::objc::{ClassType, NSInteger, NSUInteger, ObjCObject, BOOL}; use std::{ cmp::Ordering, fmt, os::raw::{ c_char, c_double, c_float, c_int, c_long, c_longlong, c_short, c_uchar, c_uint, c_ulong, c_ulonglong, c_u...
the_stack
use crate::{error::Error, opts::Opts}; use ahash::AHashMap; use either::Either; use parser::parse; use serde::Deserialize; #[cfg(test)] use serde::Serialize; use std::{ borrow::Cow, env, fs::{self, File}, io::{BufReader, Read}, path::{Path, PathBuf}, }; mod parser; type Config = AHashMap<String, V...
the_stack
extern crate lz4_flex; const COMPRESSION10MB: &[u8] = include_bytes!("../../benches/dickens.txt"); fn main() { // use cpuprofiler::PROFILER; // PROFILER.lock().unwrap().start("./my-prof.profile").unwrap(); for _ in 0..100 { compress(COMPRESSION10MB as &[u8]); } // compress(COMPRESSION10MB ...
the_stack
use std::{ collections::{HashMap, HashSet}, sync::Arc, }; use anyhow::Result; use petgraph::{algo::kosaraju_scc, graph::DiGraph}; use rpds::RedBlackTreeMapSync; use thiserror::Error; use crate::{ data::treewalker::{ bytecode::TwGraphNode, vm_value::{VmListType, VmSetType, VmTableType}, }, schema::co...
the_stack
use crate::client::{ mqttstate::MqttState, network::stream::NetworkStream, prepend::Prepend, Command, Notification, Request, UserHandle, }; use crate::codec::MqttCodec; use crate::error::{ConnectError, NetworkError}; use crate::mqttoptions::{MqttOptions, Proxy, ReconnectOptions}; use crossbeam_channel::...
the_stack
use cell_gc::{GcHeapSession, GcLeaf}; use cell_gc::collections::VecRef; use env::StaticEnvironmentRef; use errors::Result; use value::{InternedString, Pair, Value}; pub mod op { pub type OpCode = u32; pub const RETURN: OpCode = 0; // () pub const POP: OpCode = 1; // () pub const CONSTANT: OpCode = 2; ...
the_stack
use crate::world2d::camera2d::Camera2DPlugin; use crate::world2d::interaction2d::Interaction2DPlugin; use bevy::prelude::*; /// Ugly solution for ignoring input. pub struct Lock(pub bool); #[derive(Debug, Clone, PartialEq, Eq)] pub enum InteractionMode { Select, Pan, } pub struct NodusWorld2DPlugin; impl Pl...
the_stack
use crate::parse::SourcePos; use crate::token::Token; use crate::token::Token::*; use std::iter as std_iter; use std::mem; /// Indicates an error such that EOF was encountered while some unmatched /// tokens were still pending. The error stores the unmatched token /// and the position where it appears in the source. #...
the_stack
use sqlite::{Error, State}; const CREATE_URLS_TABLE: &str = " CREATE TABLE IF NOT EXISTS urls( pk INTEGER PRIMARY KEY DESC, path STRING, title STRING, song_type STRING, authoring_tool STRING, artist STRING, album STRING, ...
the_stack
use crate::{ fa::{GradientUpdate, ScaledGradientUpdate, StateActionUpdate, StateUpdate}, params::*, Differentiable, Enumerable, Function, Handler, }; use ndarray::{Array1, ArrayBase, Axis, DataMut, Dimension, Ix1, IntoDimension}; pub use lfa::*; pub mod basis { pub use lfa::basis::*; ...
the_stack
use crate::network::{constants, core_utils, types}; use ipnet; use log::debug; use log::warn; use nix::sched; use rand::Rng; use std::collections::HashMap; use std::fs::File; use std::io::Error; use std::net::IpAddr; use std::os::unix::prelude::*; use std::thread; pub struct Core { pub networkns: String, } impl C...
the_stack
use crate::{ config::SharedConfig as Config, gopher::{self, Type}, terminal, ui::{self, Action, Key, View, MAX_COLS, SCROLL_LINES}, }; use std::fmt; /// The Menu holds our Gopher Lines, a list of links, and maintains /// both where the cursor is on screen and which lines need to be /// drawn on screen....
the_stack
use geom::Rect; use surface::Colour; use surface::{SurfaceView}; pub struct Menu<I: MenuItems> { window: ::syscalls::gui::Window, hilight: ::std::cell::RefCell<usize>, buffer: ::surface::Surface, items: I, } impl<I: MenuItems> Menu<I> { /// Create a new popup menu pub fn new(debug_name: &str, items: I) -> Menu<I...
the_stack
use super::calc_consensus::{CalcNonOverlappingConsensus, CalcOverlappingConsensus}; use anyhow::Result; use bio::io::fastq; use derive_new::new; use rust_htslib::bam; use rust_htslib::bam::record::Aux; use rust_htslib::bam::Read; use std::cmp::Ordering; use std::collections::{BTreeMap, HashMap, HashSet}; use std::io; u...
the_stack
//! Provides a struct for registering signal handlers that get cleared on drop. use std::convert::TryFrom; use std::fmt::{self, Display}; use std::io::{Cursor, Write}; use std::panic::catch_unwind; use std::result; use libc::{c_int, c_void, STDERR_FILENO}; use crate::errno; use crate::signal::{ clear_signal_hand...
the_stack
use std::{ boxed::Box, collections::{HashSet, VecDeque}, os::raw::*, ptr, slice, str, sync::{Arc, Mutex, Weak}, }; use cocoa::{ appkit::{NSApp, NSEvent, NSEventModifierFlags, NSEventPhase, NSView, NSWindow}, base::{id, nil}, foundation::{NSInteger, NSPoint, NSRect, NSSize, NSString, NSUInteger}, }; use...
the_stack
use super::{ super::{imports::*, FromRawHandle}, Instancer, PipeMode, PipeOps, PipeStream, PipeStreamRole, }; use std::{ borrow::Cow, convert::TryInto, ffi::OsStr, fmt::{self, Debug, Formatter}, io, marker::PhantomData, num::{NonZeroU32, NonZeroU8}, ptr, sync::{ atomi...
the_stack
use exonum::{ blockchain::ConsensusConfig, crypto::{KeyPair, PublicKey, Seed, PUBLIC_KEY_LENGTH, SEED_LENGTH, SIGNATURE_LENGTH}, helpers::user_agent, merkledb::BinaryValue, messages::{SignedMessage, Verified}, }; use futures::{ channel::mpsc, future::{self, AbortHandle}, prelude::*, }; u...
the_stack
use std::{ fmt, io::{BufRead, Write}, }; use crate::{ address::{AddrType, Attributes, ExtendedAddr, SpendingData}, coin::{self, Coin}, config::ProtocolMagic, hash::Blake2b256, hdwallet::{Signature, XPrv, XPub, SIGNATURE_SIZE, XPUB_SIZE}, merkle, redeem, tags::SigningTag, }; use cbo...
the_stack
//! Types and functions related to HTTP request. use http::Method; pub use http::StatusCode; use serde::{Deserialize, Deserializer, Serialize}; use serde_json::Value; use serde_repr::{Deserialize_repr, Serialize_repr}; use url::Url; use std::{collections::HashMap, path::PathBuf, time::Duration}; #[cfg(feature = "req...
the_stack
extern crate clap; use crossbeam::channel; use ed25519_dalek::Keypair; use log::{debug, error, info}; use piper; use prism::api::Server as ApiServer; use prism::blockchain::BlockChain; use prism::blockdb::BlockDatabase; use prism::config::BlockchainConfig; use prism::crypto::hash::H256; use prism::experiment::transact...
the_stack
use crate::net::SecretKeyError; use derive_more::{Display, Error, From}; use futures::{SinkExt, StreamExt}; use serde::{de::DeserializeOwned, Serialize}; use std::marker::Unpin; use tokio::io::{self, AsyncRead, AsyncWrite}; use tokio_util::codec::{Framed, FramedRead, FramedWrite}; mod codec; pub use codec::*; mod inm...
the_stack
use super::simple_passes::outgoing_edges; use super::{apply_rewrite_rules, id}; use rspirv::dr::{Block, Function, Instruction, ModuleHeader, Operand}; use rspirv::spirv::{Op, Word}; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use std::collections::hash_map; pub fn mem2reg( header: &mut ModuleHeader, ...
the_stack
use core::{ cmp::PartialOrd, fmt, hash::{Hash, Hasher}, iter::{FromIterator, Product}, marker::PhantomData, mem::{self, transmute_copy, MaybeUninit}, ops::{ Add, AddAssign, Deref, DerefMut, Div, DivAssign, Index, IndexMut, Mul, MulAssign, Neg, Sub, SubAssign, }, }; #[cfg...
the_stack
use ron::de::from_reader; use ron::ser::{to_string_pretty, PrettyConfig}; use serde_derive::{Serialize, Deserialize}; use std::collections::BTreeMap; use std::fs::File; use std::io::{BufReader, BufWriter, Write}; use rpfm_error::Result; use rpfm_lib::settings::get_config_path; /// Name of the file which contains the...
the_stack
use std::cmp::Ordering::{Less, Equal}; use std::iter::{FusedIterator, DoubleEndedIterator}; use std::mem; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; /// Provides a `saturating_add()` method for `Ipv4Addr` and `Ipv6Addr`. /// /// Adding an integer to an IP address returns the modified IP address. /// A `u32` may added...
the_stack
use crate::{ core::{ algebra::Vector2, color::Color, math::aabb::AxisAlignedBoundingBox, pool::Handle, visitor::prelude::*, }, engine::PhysicsBinder, physics3d::{ body::RigidBodyContainer, collider::ColliderContainer, desc::{ColliderDesc, ColliderShapeDesc, JointD...
the_stack
#![deny(warnings)] use channel_protocol::{ChannelProtocol, ProtocolError}; use clap::{value_t, App, AppSettings, Arg, SubCommand}; use failure::{bail, Error}; use std::collections::HashMap; use std::io::{self, Write}; use std::time::Duration; fn start_session(channel_proto: &ChannelProtocol) -> Result<(), Error> { ...
the_stack
//! KCB is the local kernel control that stores all core local state. use alloc::string::String; use alloc::sync::Arc; use core::cell::{RefCell, RefMut}; use core::fmt::Debug; use core::slice::from_raw_parts; use arrayvec::ArrayVec; use log::error; use logos::Logos; use node_replication::{Replica, ReplicaToken}; use ...
the_stack
use crate::std_facade::{fmt, Arc, Box, Rc}; use core::cmp; use crate::strategy::*; use crate::test_runner::*; //============================================================================== // Traits //============================================================================== /// A new [`ValueTree`] from a [`St...
the_stack
use abstract_type::{TypeNode, TypeScope, TypeNodeRef}; use ast::{Id, Node, Loc, SourceFile}; use define::{Definitions, MethodVisibility, MethodDef, IvarDef, ConstReference}; use environment::Environment; use object::{RubyObject, Scope, ConstantEntry, IncludeError}; use report::Detail; use std::cell::Cell; use std::rc::...
the_stack
#![cfg_attr(not(feature = "std"), no_std)] pub use pallet::*; mod offline; #[cfg(test)] mod mock; #[cfg(test)] mod tests; #[frame_support::pallet] pub mod pallet { use codec::{Decode, Encode}; use dispatch::DispatchResult; use frame_support::pallet_prelude::*; use frame_support::traits::OnUnbalance...
the_stack
use std::task::Poll; use futures_signals::signal_vec::{MutableVec, SignalVecExt, VecDiff}; mod util; #[test] fn sync() { let _: Box<dyn Send + Sync> = Box::new(MutableVec::<()>::new()); let _: Box<dyn Send + Sync> = Box::new(MutableVec::<()>::new().signal_vec()); let _: Box<dyn Send + Sync> = Box::new(Mu...
the_stack
use crate::{plugins::genetics::GlobalFitnessMap, vehicle::Vehicle}; use crate::{ plugins::genetics::SimulationParams, vehicle::Block, vehicle_states::{VehicleID, VehicleStates}, }; use bevy::prelude::*; use bevy_rapier2d::physics::TimestepMode; use bevy_rapier2d::prelude::*; use ndarray::{Array, Array2}; u...
the_stack
use self::na::Vector3; use whitebox_lidar::*; use crate::na; use whitebox_common::structures::{DistanceMetric, FixedRadiusSearch2D, FixedRadiusSearch3D}; use crate::tools::*; use num_cpus; use std::env; use std::f64; use std::f64::NEG_INFINITY; use std::io::{Error, ErrorKind}; use std::path; use std::sync::mpsc; use st...
the_stack
use crate::spirv; use super::DecodeError as Error; use std::convert::TryInto; use std::result; use std::str; pub type Result<T> = result::Result<T, Error>; const WORD_NUM_BYTES: usize = 4; /// The SPIR-V binary decoder. /// /// Takes in a vector of bytes, and serves requests for raw SPIR-V words /// or values of a ...
the_stack
use std::cmp::{Ordering, PartialEq, PartialOrd}; use std::collections::HashMap; use std::convert::TryInto; use std::fmt; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; use std::num::NonZeroU32; use std::sync::Mutex; #[cfg(feature = "urid-derive")] pub use urid_derive::*; /// Representation of a borrowed...
the_stack
use std::borrow::Cow; use std::ffi::OsStr; use std::path::{Path, PathBuf}; trait IntoChar { fn into_char(self) -> char; } impl IntoChar for char { fn into_char(self) -> char { self } } impl IntoChar for u8 { fn into_char(self) -> char { char::from(self) } } impl<T: IntoChar + Cop...
the_stack
mod resource_builder_set; pub use self::resource_builder_set::{ read_builder, read_builders, read_single_resource, read_single_resource_path, read_to_string, write_json_to_file, write_to_file, }; pub mod sound_set; pub use self::sound_set::{SoundSetBuilder, SoundSet}; mod spritesheet; pub use self::spriteshee...
the_stack
use core::iter::Iterator; use x86::current::paging::PTFlags; use super::vspace::*; use crate::error::KError; use crate::memory::{Frame, PAddr, VAddr, BASE_PAGE_SIZE}; /// A simple model address space /// /// Can be used by property testing to see if a hardware address space /// implementation is equivalent. pub(crat...
the_stack