text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use crate::{
connection,
crypto::{
retry,
retry::{IntegrityTag, RetryKey},
CryptoError,
},
inet::SocketAddress,
packet::{
decoding::HeaderDecoder,
initial::ProtectedInitial,
long::{DestinationConnectionIdLen, SourceConnectionIdLen, Version},
Ta... | the_stack |
mod edit;
#[cfg(test)]
mod test_basic;
#[cfg(test)]
mod test_ported;
pub use self::edit::InputEditor;
use crate::dic::category_type::CategoryType;
use crate::dic::grammar::Grammar;
use std::ops::Range;
use crate::error::{SudachiError, SudachiResult};
use crate::input_text::InputTextIndex;
/// limit on the maximum le... | the_stack |
use std::collections::hash_set::HashSet;
use crate::gate::{
core::{Name, *},
graphics::{clk::*, light_bulb::*, toggle_switch::*, segment_display::*},
serialize::*,
};
use bevy::prelude::*;
use crate::GameState;
pub struct UndoPlugin;
impl Plugin for UndoPlugin {
fn build(&self, app: &mut App) {
... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ApplicationSummary {
/// <p>The unique Id of the web application.</p>
pub application_id: std::option::Option<std::string::String>,
/// <p>The name of the web application.</p>
pub application_name: std::option::Option<std::st... | the_stack |
use crate::{
pid_from_usize, CpuID, Error, Exception, MemoryAddress, MemoryFlags, MemoryMessage,
MemoryRange, MemorySize, MemoryType, Message, MessageEnvelope, MessageSender, ProcessArgs,
ProcessInit, Result, ScalarMessage, SysCallResult, ThreadInit, CID, PID, SID, TID,
};
use core::convert::{TryFrom, TryIn... | the_stack |
use parking_lot::RwLock;
use rayon::prelude::*;
use serde_json;
use wasm::{BlockType, Idx, Mutability, Val, ValType::*, FunctionType, Label};
use wasm::highlevel::{Function, GlobalOp, Instr, Instr::*, LocalOp::*, Module, MemoryOp};
use crate::options::{Hook, HookSet};
use self::block_stack::{BlockStack, BlockStackEle... | the_stack |
//! Abstract Syntax Tree (AST) for the EndBASIC language.
use crate::parser::{Error, Result};
use std::fmt;
/// Represents an expression and provides mechanisms to evaluate it.
#[derive(Clone, Debug, PartialEq)]
pub enum Expr {
/// A literal boolean value.
Boolean(bool),
/// A literal double-precision flo... | the_stack |
use std::{
borrow::Cow, collections::hash_map::DefaultHasher, convert::TryInto, hash::Hasher, io::Write,
};
#[cfg(test)]
use std::sync::Arc;
use blake2::{
digest::{Update, VariableOutput},
VarBlake2b,
};
use crypto::hash::ContextHash;
use tezos_timing::{RepositoryMemoryUsage, SerializeStats};
use crate::... | the_stack |
use mach::message::mach_msg_type_number_t;
use mach::port::mach_port_t;
use mach::task::{task_info, task_resume, task_suspend};
use mach::task_info::{task_info_t, TASK_DYLD_INFO};
use mach::thread_act::{thread_get_state, thread_resume, thread_suspend};
use mach::thread_status::thread_state_flavor_t;
use mach::thread_st... | the_stack |
use bytes::{Buf, BufMut, BytesMut};
use log::{info, trace};
use std::collections::HashMap;
use tokio::net::tcp::OwnedWriteHalf;
use crate::config::{get_config, parse};
use crate::errors::Error;
use crate::messages::*;
use crate::pool::ConnectionPool;
use crate::stats::get_stats;
/// Handle admin client.
pub async fn ... | 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::common::{
DebugLineStrOffset, DebugStrOffset, DebugStrOffsetsBase, DebugStrOffsetsIndex, DwarfFileType,
Encoding, SectionId,
};
use crate::endianity::Endianity;
use crate::read::{EndianSlice, Reader, ReaderOffset, Result, Section};
use crate::Format;
/// The `DebugStr` struct represents the DWARF st... | the_stack |
pub mod marketdata;
pub mod dependencies;
pub mod cache;
pub mod bumptime;
pub mod deltagamma;
pub mod timebumped;
pub mod vegavolga;
use risk::timebumped::{TimeBumpedReportGenerator, TimeBumpedReport};
use risk::deltagamma::{DeltaGammaReportGenerator, DeltaGammaReport};
use risk::vegavolga::{VegaVolgaReportGenerator,... | the_stack |
use super::{
BallVelocityConstraint, BallVelocityGroundConstraint, FixedVelocityConstraint,
FixedVelocityGroundConstraint, PrismaticVelocityConstraint, PrismaticVelocityGroundConstraint,
};
#[cfg(feature = "dim3")]
use super::{RevoluteVelocityConstraint, RevoluteVelocityGroundConstraint};
#[cfg(feature = "simd-... | the_stack |
#![crate_name="rustcxx_common"]
#![feature(rustc_private, slice_patterns)]
extern crate syntax;
extern crate rustc;
mod types;
use std::borrow::Cow;
use std::hash::{SipHasher, Hash, Hasher};
use std::iter;
use syntax::abi::Abi;
use syntax::ast::{self, DUMMY_NODE_ID};
use syntax::codemap::{Span, Spanned, dummy_spann... | the_stack |
use crate::algorithms::ProjectType;
use crate::fst_properties::FstProperties;
use crate::semirings::Semiring;
use crate::{Label, Tr};
use crate::{StateId, EPS_LABEL};
pub fn set_start_properties(inprops: FstProperties) -> FstProperties {
let mut outprops = inprops & FstProperties::set_start_properties();
if in... | the_stack |
use std::convert::TryInto;
use cookie_factory::*;
use itertools::Itertools;
use nom::{
bytes::streaming::{tag, take},
combinator::{complete, map, map_res},
error::{Error as NomError, ErrorKind},
multi::{length_count, length_data, length_value, many0},
number::streaming::{be_u16, be_u32, be_u64, be_... | the_stack |
mod default_shaders;
mod input;
mod profiler_window;
mod recorder;
mod render_bundle;
mod shader_module;
mod utils;
#[allow(dead_code)]
mod audio;
use profiler_window::ProfilerWindow;
use std::{
error::Error,
io::Write,
path::{Path, PathBuf},
time::{Duration, Instant},
};
use pilka_types::{PipelineI... | the_stack |
// Based on SkStroke.cpp
use crate::{Path, Point, PathBuilder, Transform, PathSegment, PathSegmentsIter, StrokeDash};
use crate::floating_point::{NormalizedF32, NonZeroPositiveF32, NormalizedF32Exclusive};
use crate::path_builder::PathDirection;
use crate::path_geometry;
use crate::scalar::{Scalar, SCALAR_NEARLY_ZERO... | the_stack |
use super::super::Handler;
use super::super::InstructionSet;
use super::opcodes::*;
use super::*;
use constants::*;
use std::collections::HashMap;
#[allow(dead_code)]
pub struct OpcodeHandler<T: Core> {
mask: u32,
matching: u32,
pub name: &'static str,
handler: Handler<T>,
}
macro_rules! op_entry {
... | the_stack |
use std;
use std::cell::RefCell;
use std::io::{Cursor, Read, Seek, SeekFrom};
use std::rc::Rc;
use vec_map::VecMap;
use bytes;
use bytes::compress::*;
use bytes::serialize::*;
use bytes::varnum::*;
use escaped_wtf8;
use io::*;
use multipart::{FormatInTable, HEADER_GRAMMAR_TABLE, HEADER_STRINGS_TABLE, HEADER_TREE};
us... | the_stack |
use std::rc::Rc;
use std::io::Result;
use mio::{Ready, PollOpt};
use core::Message;
use transport::async::stub::*;
use transport::async::state::*;
use transport::async::dead::Dead;
use transport::pipe::{Event, Context};
pub struct Active<S> {
stub: S,
can_send_msg: bool,
can_recv_msg: bool
}
impl<S : A... | the_stack |
//! PeerBranchBootstrapper is actor, which is responsible to download branches from peers
//! and schedule downloaded blocks for block application.
//! PeerBranchBootstrapper operates just for one chain_id.
use std::collections::HashSet;
use std::net::SocketAddr;
use std::sync::Arc;
use std::time::{Duration, Instant};... | the_stack |
use std::cmp;
use std::convert::{AsRef, TryFrom};
use std::fmt;
use std::marker::PhantomData;
use std::ops;
use std::sync::Arc;
use ed25519_dalek::Keypair;
use super::grammar::Grammar;
use super::{CIDError, CID};
use super::{DatasetRefAny, DatasetRefLocal, DatasetRefRemote};
use super::{Multicodec, Multihash};
/////... | the_stack |
use super::{DOC_CSS_NAME, NORMALIZE_CSS_NAME};
use crate::doc_builder::DocBuilder;
use crate::escape::Escape;
use crate::macros::FormatAttribute;
use crate::rendering::markdown_to_html;
use core::errors::Result;
use core::flavored::*;
use core::{AsPackage, CoreFlavor, Spanned};
use std::ops::DerefMut;
use syntect::high... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_cas... | the_stack |
use std::fmt::{Debug, Display, Formatter, Result};
use strum_macros::EnumString;
/// This enum specifies the ISO 639-1 code representations for the supported languages.
///
/// ISO 639 is a standardized nomenclature used to classify languages.
#[derive(Debug, Eq, PartialEq, EnumString)]
#[allow(clippy::upper_case_acro... | the_stack |
use core::convert::{TryFrom, TryInto};
use std::collections::hash_map::Entry;
use std::collections::HashMap;
use std::error::Error;
use std::hash::Hash;
use crate::core::support::configuration::{
self, Compression, FileSource, GraphOptions, GraphSource,
};
use crate::core::support::{units, units::Unit};
use crate:... | the_stack |
use crate::handlers::{ProcessKeys, HandlerResult};
use crate::key_codes::{KeyCode, KeyCodeInfo};
use crate::key_stream::{iter_unhandled_mut, Event, EventStatus};
use crate::Modifier::*;
use crate::USBKeyOut;
use core::convert::TryInto;
use no_std_compat::prelude::v1::*;
use smallbitvec::sbvec;
/// The default bottom l... | the_stack |
use super::{ButtplugDeviceResultFuture, ButtplugProtocol, ButtplugProtocolCommandHandler};
use crate::{
core::messages::{self, ButtplugDeviceCommandMessageUnion, DeviceMessageAttributesMap},
device::{
protocol::{generic_command_manager::GenericCommandManager, ButtplugProtocolProperties},
DeviceImpl,
Dev... | the_stack |
use core::arch::aarch64::*;
use core::mem::transmute;
// The round constant word array.
const RCON: [u32; 10] = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
// Forward S-Box
const FORWARD_S_BOX: [u8; 256] = [
// 0 1 2 3 4 5 6 7 8 9 A B C D E... | the_stack |
use chrono_humanize::{Accuracy, HumanTime, Tense};
use console::style;
use futures::{Future, FutureExt};
use iml_wire_types::{
db::TargetRecord,
graphql::ServerProfile,
snapshot::{ReserveUnit, Snapshot, SnapshotInterval, SnapshotRetention},
Command, Filesystem, Host, OstPool, StratagemConfiguration, Str... | the_stack |
use std::borrow::ToOwned;
use std::cell::RefCell;
use std::fmt;
use std::marker::PhantomData;
use std::mem::MaybeUninit;
use std::os::raw::c_char;
use std::ptr;
use std::rc::Rc;
use crate::binding::*;
use crate::chkerr;
use crate::connection::Conn;
use crate::oci_attr::data_type::{AttrValue, DataType};
use crate::oci_... | the_stack |
mod int_to_float {
pub fn u32_to_f32_bits(i: u32) -> u32 {
if i == 0 {
return 0;
}
let n = i.leading_zeros();
let a = (i << n) >> 8; // Significant bits, with bit 24 still in tact.
let b = (i << n) << 24; // Insignificant bits, only relevant for rounding.
... | the_stack |
use std::fmt::Debug;
use rustc::hir;
use rustc::hir::def_id::DefId;
use rustc::ty;
use syntax::ast::*;
use syntax::visit::{self, Visitor};
use crate::context::HirMap;
/// Provider of a higher-level type representation.
///
/// Methods can return `None` under any circumstances to indicate that the provider can't find... | the_stack |
use crate::prelude::*;
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::Arc;
use std::time::Duration;
use serde::Deserialize;
use crate::eve::eve::EveJson;
use crate::eve::filters::AddRuleFilter;
use crate::importer::Importer;
use crate::settings::Settings;
use crate::{bookmark, eve};
#[derive(D... | the_stack |
use crate::common::*;
#[cfg(not(feature = "small"))]
pub use crate::d2s_full_table::*;
use crate::d2s_intrinsics::*;
#[cfg(feature = "small")]
pub use crate::d2s_small_table::*;
#[cfg(not(maybe_uninit))]
use core::mem;
#[cfg(maybe_uninit)]
use core::mem::MaybeUninit;
pub const DOUBLE_MANTISSA_BITS: u32 = 52;
pub const... | the_stack |
use crate::topic::TopicHash;
use crate::types::{MessageId, RawGossipsubMessage};
use libp2p_core::PeerId;
use log::{debug, trace};
use std::fmt::Debug;
use std::{
collections::{HashMap, HashSet},
fmt,
};
/// CacheEntry stored in the history.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct CacheEntry {
... | the_stack |
use iced_native::Layout;
use std::collections::HashMap;
use iced_graphics::{
backend,
canvas::{self, LineCap, Path, Stroke},
Backend, Color, Defaults, Point, Primitive, Rectangle, Renderer, Size, Vector,
};
use iced_native::mouse;
use crate::{
core::{
color::{HexString, Hsv},
renderer:... | the_stack |
use syntax::{Name, INVALID_NAME};
use syntax::ast::FunctionRef;
use syntax::token::name;
use rt::{JsEnv, JsFunction, JsRawValue, JsValue, JsItem, JsDescriptor, JsScope, JsType, JsString};
use rt::{JsArgs, JsFnMode, JsHandle, JsFn};
use rt::{GC_OBJECT, GC_ENTRY};
use rt::validate_walker_field;
use rt::value::validate_wa... | the_stack |
#![feature(once_cell)]
#[macro_use]
extern crate log;
mod cmd;
mod executor;
mod util;
use std::{
borrow::ToOwned,
fs::{self, File, OpenOptions},
io::{self, BufRead, BufReader, Read},
path::Path,
str,
string::ToString,
sync::Arc,
thread,
time::Duration,
u64,
};
use encryption... | the_stack |
use keypad::Keypad;
use display::{Display, FONT_SET};
use rand::ComplementaryMultiplyWithCarryGen;
pub struct Cpu {
// index register
pub i: u16,
// program counter
pub pc: u16,
// memory
pub memory: [u8; 4096],
// registers
pub v: [u8; 16],
// th
pub keypad: Keypad,
// disp... | the_stack |
use std::borrow::{Borrow, BorrowMut, ToOwned};
use std::ffi::CStr;
use std::fmt;
use std::mem;
use std::ops::{Deref, DerefMut};
use std::ptr;
use std::str;
use once_cell::sync::Lazy;
use glib::translate::*;
use glib::StaticType;
#[doc(alias = "GstCapsFeatures")]
pub struct CapsFeatures(ptr::NonNull<ffi::GstCapsFeatu... | the_stack |
use std::prelude::v1::*;
use crate::cmp::Cmp;
use crate::key_types::{parse_internal_key, truncate_to_userkey, LookupKey, ValueType};
use crate::merging_iter::MergingIter;
use crate::snapshot::Snapshot;
use crate::types::{Direction, LdbIterator, Shared};
use crate::version_set::VersionSet;
use std::cmp::Ordering;
use ... | the_stack |
use super::{ShellClientMessage, ShellServerMessage, ShellServerStream};
use crate::{ShellKey, TunnelStream};
use anyhow::{Error, Result};
use futures::stream::StreamExt;
use log::*;
use std::time::Duration;
use tokio::{io::AsyncWriteExt, time};
use tokio_util::compat::*;
mod fallback;
use fallback::*;
mod default;
pu... | the_stack |
use crypto_api_chachapoly::ChachaPolyIetf;
use ff::{Field, PrimeField};
use group::GroupEncoding;
use keys::Address;
use lazy_static::lazy_static;
use rand::{rngs::OsRng, CryptoRng, RngCore};
use sha2::{Digest, Sha256};
use types::U256;
use zcash_primitives::memo::MemoBytes;
use zcash_primitives::merkle_tree::MerklePat... | the_stack |
use core::dur_hitbox::DurHitbox;
use core::events::{EventKey, EventKeysMap, EventManager, InternalEvent};
use core::grid::Grid;
use core::{HbGroup, HbId, HbProfile, HbVel, Hitbox, HIGH_TIME};
use fnv::FnvHashMap;
use geom::PlacedShape;
use std::mem;
use util::TightSet;
// TODO check that floating point values are with... | the_stack |
use crate::{
counters,
logging::{LogEntry, LogEvent, LogSchema},
network::MempoolSyncMsg,
shared_mempool::{
tasks,
types::{notify_subscribers, SharedMempool, SharedMempoolNotification},
},
};
use diem_config::config::{MempoolConfig, PeerNetworkId, PeerRole, RoleType};
use diem_infall... | the_stack |
use std::collections::{HashMap, HashSet};
use std::fmt;
/* A function that immediately panics */
pub fn get_out () -> ! {
panic!("Uh oh!")
}
/* The logical and operation as a function on bool */
pub fn bool_and (x:bool, y:bool) -> bool {
x & y
}
/* The logical and operation as a function on bools in a pair *... | the_stack |
use std::time::Duration;
use hurl::http::*;
pub fn new_header(name: &str, value: &str) -> Header {
Header {
name: name.to_string(),
value: value.to_string(),
}
}
fn default_client() -> Client {
let options = ClientOptions::default();
Client::init(options)
}
fn default_get_request(url... | the_stack |
use std::sync::Arc;
use crate::comments::MultiThreadedComments;
use crate::swc::ast::EsVersion;
use crate::swc::ast::Module;
use crate::swc::ast::Program;
use crate::swc::ast::Script;
use crate::swc::common::comments::SingleThreadedComments;
use crate::swc::common::input::StringInput;
use crate::swc::parser::error::Er... | the_stack |
use itertools::Itertools;
use regex::Regex;
use std::collections::HashMap;
use std::ffi::OsStr;
use std::fs;
use std::lazy::SyncLazy;
use std::path::Path;
use walkdir::WalkDir;
use crate::clippy_project_root;
const GENERATED_FILE_COMMENT: &str = "// This file was generated by `cargo dev update_lints`.\n\
// Use ... | the_stack |
#[macro_use]
extern crate more_asserts;
use lz4_compress::compress as lz4_rust_compress;
#[cfg(feature = "frame")]
use lz4_flex::frame::BlockMode;
use lz4_flex::{
block::{compress_prepend_size, decompress_size_prepended},
compress, decompress,
};
const COMPRESSION1K: &[u8] = include_bytes!("../benches/compres... | the_stack |
use crate::openapi::{
generate::{crate_syn_browser::Method, type_info::TypeInfo, Gen},
schema::{OpenApiMimeType, OpenApiSchema},
};
use syn::{GenericArgument, Lit, Meta, MetaList, NestedMeta, Path, PathArguments, ReturnType, Type};
#[derive(Clone, Debug, Default)]
pub(crate) struct ResponseInfo {
pub(crate... | the_stack |
use std::env;
use std::fmt;
use std::future::Future;
use std::str::FromStr;
use std::sync::Arc;
use std::time::Instant;
use actix::prelude::*;
use chrono::DateTime;
use cron;
use humantime;
use log;
use tokio::sync::Semaphore;
use crate::clock_synchronizer::ClockSynchronizer;
use crate::config::Config;
use crate::dat... | the_stack |
#[cfg(feature = "f16")]
use crate::bf16::bf16;
#[cfg(feature = "f16")]
use crate::f16::f16;
use core::{fmt, mem, ops};
// AS PRIMITIVE
// ------------
/// Type that can be converted to primitive with `as`.
pub trait AsPrimitive: Copy + PartialEq + PartialOrd + Send + Sync + Sized {
fn as_u8(self) -> u8;
fn as... | the_stack |
use crate::default::{F32x4, I32x4, U32x4};
use crate::scalar::F32x4 as F32x4S;
// F32x4
#[test]
fn test_f32x4_constructors() {
let a = F32x4::new(1.0, 2.0, 3.0, 4.0);
assert_eq!((a[0], a[1], a[2], a[3]), (1.0, 2.0, 3.0, 4.0));
let b = F32x4::splat(10.0);
assert_eq!(b, F32x4::new(10.0, 10.0, 10.0, 10.0... | the_stack |
use std::io::{Read, Write};
use std::ops::{Deref, DerefMut};
use crate::dh::Dh;
use crate::error::ErrorStack;
use crate::ssl::{
HandshakeError, Ssl, SslContext, SslContextBuilder, SslContextRef, SslMethod, SslMode,
SslOptions, SslRef, SslStream, SslVerifyMode,
};
use crate::version;
const FFDHE_2048: &str = "... | the_stack |
//! rust-3d
//! =======
//! 3D/2D library written in Rust.
//! Offering useful containers, structures and algorithms for 2D and 3D space.
//! Meant as basis for numeric algorithms, viewers, game engines, ...
//!
//!
//! Migration 0.29.0 -> 0.30.0
//! --------------------------
//! Note that the module structure changed... | the_stack |
use std::{
borrow::Cow,
fmt::{Display, Formatter},
};
use bstr::BStr;
/// The positive result produced by [describe()][function::describe()].
#[derive(Debug, Clone)]
pub struct Outcome<'name> {
/// The name of the tag or branch that is closest to the commit `id`.
///
/// If `None`, no name was fou... | the_stack |
extern crate assert_matches;
extern crate base64;
extern crate byteorder;
extern crate futures;
extern crate hex;
#[macro_use]
extern crate lazy_static;
extern crate openssl;
#[macro_use]
extern crate quick_error;
extern crate rand;
extern crate ring;
extern crate serde;
#[macro_use]
extern crate serde_derive;
#[macro_... | the_stack |
use super::mystd::ffi::{OsStr, OsString};
use super::mystd::fs;
use super::mystd::os::unix::ffi::{OsStrExt, OsStringExt};
use super::mystd::path::{Path, PathBuf};
use super::Either;
use super::{Context, Mapping, Stash, Vec};
use core::convert::{TryFrom, TryInto};
use core::str;
use object::elf::{ELFCOMPRESS_ZLIB, ELF_N... | the_stack |
use crate::{
auto_remote_syscalls::AutoRemoteSyscalls,
emu_fs::EmuFs,
kernel_abi::{syscall_number_for_close, syscall_number_for_munmap, SupportedArch},
log::LogDebug,
preload_interface::syscallbuf_hdr,
remote_ptr::{RemotePtr, Void},
session::{
address_space::{
memory_rang... | the_stack |
use crate::tommath_bindings::{mp_digit, mp_int};
use core::ops::{Add, AddAssign, Div, Mul, Sub, SubAssign};
use crate::constants::WORD_SIZE;
use crate::rts_trap_with;
pub fn size_of<T>() -> Words<u32> {
Bytes(::core::mem::size_of::<T>() as u32).to_words()
}
/// The unit "words": `Words(123u32)` means 123 words.
... | the_stack |
use super::{sys, Method, Property, Sel, BOOL};
use crate::core::{Arc, ObjectType};
use std::{
cell::UnsafeCell,
cmp,
ffi::CStr,
fmt, hash, mem,
os::raw::{c_char, c_int},
panic::RefUnwindSafe,
ptr,
};
#[cfg(feature = "malloced")]
use malloced::Malloced;
/// An Objective-C class.
///
/// See... | the_stack |
extern crate reqwest;
extern crate postgres;
#[macro_use] extern crate serde_json;
#[cfg(test)]
mod test {
use std::fs::File;
use std::io::prelude::*;
use postgres::{Connection, TlsMode};
use std::process::Command;
use std::time::Duration;
use std::thread;
use reqwest;
#[test]
fn f... | the_stack |
extern crate quick_error;
use locate_cargo_manifest::{locate_manifest, LocateManifestError};
mod error;
mod format_changeset;
use bytesize::ByteSize;
use criner_waste_report::{
tar_path_to_utf8_str, CargoConfig, Fix, Patterns, Report, TarHeader, TarPackage, WastedFile,
};
pub use error::Error;
use format_changes... | the_stack |
//! Private part of the node REST API.
//!
//! Private API includes requests that are available only to the blockchain
//! administrators, e.g. shutting down the node.
//!
//! # Table of Contents
//!
//! - [Get node info](#get-node-info)
//! - [Get node statistics](#get-node-statistics)
//! - [Add peer](#add-peer)
//! ... | the_stack |
use anyhow::Result;
use std::panic::{self, AssertUnwindSafe};
use wasmer::*;
#[compiler_test(traps)]
fn test_trap_return(config: crate::Config) -> Result<()> {
let store = config.store();
let wat = r#"
(module
(func $hello (import "" "hello"))
(func (export "run") (call $hello))
... | the_stack |
//! Commands to interact with the cloud service.
use crate::console::{read_line, read_line_secure, refill_and_print, Console};
use crate::service::*;
use crate::storage::{FileAcls, Storage};
use async_trait::async_trait;
use endbasic_core::ast::{ArgSep, Expr, Value, VarType};
use endbasic_core::exec::Machine;
use endb... | the_stack |
//! KAS macros
//!
//! This crate extends [impl-tools](https://crates.io/crates/impl-tools).
#![recursion_limit = "128"]
#![allow(clippy::let_and_return)]
#![allow(clippy::large_enum_variant)]
#![allow(clippy::needless_late_init)]
#![allow(clippy::redundant_pattern_matching)]
extern crate proc_macro;
use impl_tools_... | the_stack |
use proc_macro2::{Group, TokenStream};
use quote::ToTokens;
use syn::{
parse_quote, token,
visit_mut::{self, VisitMut},
Arm, Attribute, Expr, ExprMacro, ExprMatch, ExprReturn, ExprTry, Item, Local, Stmt, Token,
};
use super::{Context, VisitMode, DEFAULT_MARKER, NAME, NESTED, NEVER};
use crate::utils::{pars... | the_stack |
use crate::config::{Colors, Style};
use crate::line_split::{LineDataCache, LineType};
use libtiny_wire::formatting::{parse_irc_formatting, Color, IrcFormatEvent};
use termbox_simple::{self, Termbox};
/// A single line added to the widget. May be rendered as multiple lines on the
/// screen.
#[derive(Debug)]
pub(crate... | the_stack |
use crate::decode::lzma2;
use crate::decode::util;
use crate::error;
use crate::xz::{footer, header, CheckMethod, StreamFlags};
use byteorder::{BigEndian, LittleEndian, ReadBytesExt};
use crc::{crc32, crc64, Hasher32};
use std::hash::Hasher;
use std::io;
use std::io::Read;
#[derive(Debug)]
struct Record {
unpadded... | the_stack |
use crate::common::{
csc_strategy, csr_strategy, non_zero_i32_value_strategy, value_strategy,
PROPTEST_I32_VALUE_STRATEGY, PROPTEST_MATRIX_DIM, PROPTEST_MAX_NNZ,
};
use nalgebra_sparse::csc::CscMatrix;
use nalgebra_sparse::csr::CsrMatrix;
use nalgebra_sparse::ops::serial::{
spadd_csc_prealloc, spadd_csr_pre... | the_stack |
//! An inital stab at `Alloc`-parametric collections.
//!
//! This module contains an `Alloc`-parametric `Vec` implementation based on `RawVec`.
//! This is currently more of a proof of concept, though it may serve as a starting point
//! for more robust `Alloc`-parametric collections.
extern crate smallvec;
use self:... | the_stack |
use crate::structure::matrix::*;
#[allow(unused_imports)]
use crate::structure::vector::*;
use crate::util::useful::*;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::traits::{fp::FPVector, num::PowOps};
use std::cmp::{max, min};
use std::convert;
use std::fmt;
use std::ops::{Add, Div, Mul, N... | the_stack |
use std::collections::HashMap;
use std::collections::HashSet;
use std::io::ErrorKind;
use std::path::Path;
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::Weak;
use std::time::Duration;
use s3::bucket::Bucket;
use s3::creds::Credentials;
use tracing::instrument;
use umash::Fingerprint;
use crate::chain_error... | the_stack |
use std::io::{self, Read};
use noodles_vcf::{self as vcf, header::info::Type};
use crate::{
header::StringMap,
reader::{string_map::read_string_map_index, value::read_value},
record::{
value::{Float, Int16, Int32, Int8},
Value,
},
};
pub fn read_info<R>(
reader: &mut R,
infos:... | the_stack |
use crate::utils::opt_err;
use crate::{pointer::{NP_List_Bytes}};
use crate::{error::NP_Error, json_flex::{JSMAP, NP_JSON}, memory::{NP_Memory}, pointer::{NP_Value}, pointer::{NP_Cursor}, schema::NP_Parsed_Schema, schema::{NP_Schema, NP_TypeKeys}};
use alloc::borrow::ToOwned;
use alloc::boxed::Box;
use alloc::{vec::*}... | the_stack |
//! Rocket-powered web service implementing CRUD operations on a `ProofMapIndex`.
use actix_web::{
error::{ErrorBadRequest, ErrorNotFound},
http::Method,
server, App, Json, Path, Query, Result as ApiResult, State,
};
use chrono::Utc;
use exonum::{
blockchain::{AdditionalHeaders, Block, BlockProof, Prop... | the_stack |
use alloc::string::String;
use core::convert::TryFrom;
use kpi::io::FileType;
use crate::arch::process::UserSlice;
use crate::error::KError;
use crate::fallible_string::TryString;
use super::file::*;
use super::{Mnode, Modes};
/// Memnode representation, similar to Inode for a memory-fs.
#[derive(Debug)]
pub struct... | the_stack |
use std::collections::BTreeMap;
use rand::Rng;
use rand_xorshift::XorShiftRng;
use serde::{Deserialize, Serialize};
use geom::{Duration, Time};
use map_model::{BuildingID, TransitStopID};
use crate::pandemic::{AnyTime, State};
use crate::{CarID, Event, Person, PersonID, Scheduler, TripPhaseType};
// TODO This does ... | the_stack |
use std::{
sync::{
atomic::{AtomicBool, Ordering},
Arc, Barrier,
},
thread,
time::Duration,
};
trait Mutex<T> {
const NAME: &'static str;
fn new(v: T) -> Self;
fn lock<F, R>(&self, f: F) -> R
where
F: FnOnce(&mut T) -> R;
}
impl<T> Mutex<T> for std::sync::Mute... | the_stack |
use fnv::FnvHashMap;
use std::collections::hash_map::Entry;
use treewalk::ast::*;
pub type Depth = usize;
pub struct LexicalScopes {
depths: FnvHashMap<VariableUseHandle, Depth>,
}
impl LexicalScopes {
pub fn new() -> LexicalScopes {
LexicalScopes {
depths: FnvHashMap::default(),
... | the_stack |
#![allow(dead_code)]
use crate::rcc::{Clocks, APB2};
use crate::gpio::Analog;
use crate::gpio::{gpioa, gpiob, gpioc, gpiof};
use crate::pac::{ADC1, ADC2, ADC3, ADC_COMMON};
use cortex_m::asm::delay;
use embedded_hal::adc::{Channel, OneShot};
#[derive(Clone, Copy, Debug, PartialEq)]
#[allow(non_camel_case_types)]
... | the_stack |
use anyhow::{anyhow, Result};
use cargo_metadata::{Package, Version};
use clap::Clap;
use git2::{Commit, DescribeFormatOptions, Repository, RepositoryState};
use std::{
collections::HashMap,
ops::Range,
path::{Path, PathBuf},
str::FromStr,
};
use toml_parse::{walk, SyntaxNode, SyntaxToken, TomlKind};
#... | the_stack |
use crate::vulkan::{DescriptorSetLayoutInfo, RafxDescriptorHeapVulkan, RafxDeviceContextVulkan};
use crate::*;
use ash::version::DeviceV1_0;
use ash::vk;
struct DescriptorUpdateData {
// one per set * elements in each descriptor
image_infos: Vec<vk::DescriptorImageInfo>,
buffer_infos: Vec<vk::DescriptorBuf... | the_stack |
use async_trait::async_trait;
use futures::TryFutureExt;
use interledger_errors::BalanceStoreError;
use interledger_packet::{ErrorCode, RejectBuilder};
use interledger_service::*;
use interledger_settlement::core::{
types::{SettlementAccount, SettlementStore},
SettlementClient,
};
use std::marker::PhantomData;
... | the_stack |
use aes::cipher::generic_array::{ArrayLength, GenericArray as AesGenericArray};
use block_modes::{block_padding::NoPadding, BlockMode, Cbc};
use nom::Err;
use rand::Rng;
use ring::signature::{
UnparsedPublicKey, RSA_PKCS1_2048_8192_SHA256_RAW, RSA_PKCS1_3072_8192_SHA384_RAW,
RSA_PKCS1_4096_8192_SHA512_RAW,
};
u... | the_stack |
use std::collections::{hash_map::Entry as HashMapEntry, HashMap};
use crate::connection::{RequestConnection, SequenceNumber};
use crate::cookie::Cookie;
use crate::errors::{ConnectionError, ReplyError};
use crate::protocol::xproto::{ConnectionExt, QueryExtensionReply};
use crate::x11_utils::{ExtInfoProvider, Extension... | the_stack |
use std::str;
// These functions could also be used in a standalone library.
#[cfg(test)]
#[allow(unused)]
fn parse_utf8(bs: &[u8]) -> Option<&str> {
if is_utf8(bs) {
Some(unsafe { str::from_utf8_unchecked(bs) })
} else {
None
}
}
#[inline(always)]
pub fn is_char_boundary(b: u8) -> bool {... | the_stack |
use crate::python::get_runpy_path;
use super::rangemap::RangeMap;
use super::util::new_hashmap;
use ahash::RandomState as ARandomState;
use im::Vector as ImVector;
use inferno::flamegraph;
use itertools::Itertools;
use std::path::Path;
use std::path::PathBuf;
use std::{borrow::Cow, io::Write};
use std::{collections::H... | the_stack |
use device::{IDevice, MemorySync};
use device::Error as DeviceError;
use std::any::Any;
use std::cell::{Cell, RefCell};
use std::marker::PhantomData;
use std::{fmt, mem, error};
use std::ops::Deref;
use std::error::Error as StdError;
/// Describes the Descriptor of a SharedTensor.
pub type TensorDesc = Vec<usize>;
/... | the_stack |
use std::ffi::{CStr, CString};
use std::path::{Path, PathBuf};
use std::{env, fs, ptr};
use llvm_sys::core::*;
use llvm_sys::ir_reader::LLVMParseIRInContext;
use llvm_sys::prelude::*;
use llvm_sys::target::*;
use llvm_sys::target_machine::*;
use llvm_sys::LLVMLinkage;
use glob::glob;
use std::process::Command;
mod e... | the_stack |
use Error;
use dot::{Dot, Summary, SiteId};
use map_tuple_vec;
use traits::*;
use serde::ser::Serialize;
use serde::de::DeserializeOwned;
use std::borrow::{Borrow, Cow};
use std::cmp::Ordering;
use std::collections::HashMap;
use std::hash::Hash;
pub trait Key: Clone + Eq + Hash + Serialize + DeserializeOwned {}
impl<... | the_stack |
use std::time::{Duration, Instant, SystemTime};
use crypto::crypto_box::{CryptoKey, PublicKey};
use crypto::nonce::Nonce;
use shell_automaton::event::{P2pPeerEvent, P2pServerEvent};
use shell_automaton::peer::PeerCrypto;
use shell_automaton::peers::add::multi::PeersAddMultiAction;
use shell_automaton::{effects, reduc... | the_stack |
use crate::accel::bvh::BVHAccelerator;
use crate::accel::bvh::BinnedSAHBuilder;
use crate::distribution::Distribution1D;
use crate::*;
use crate::{accel::bvh, bsdf::Bsdf};
use serde::{Deserialize, Serialize};
use std::process::exit;
use std::sync::Arc;
extern crate tobj;
pub struct SurfaceSample {
pub p: Vec3,
... | the_stack |
#![warn(missing_docs)]
//! Encoding and decoding Bech32 Bitcoin Segwit Addresses
//!
//! Encoding and decoding for Bech32 strings and Bitcoin Segregated Witness
//! addresses. Bech32 is a 5-bit (base-32) encoding scheme that produces
//! strings that comprise a human-readable part, a separator, a data part,
//! and ... | the_stack |
use std::time::Duration;
use extra::rand::Randomizer;
pub const GRID_WIDTH: u8 = 10;
pub const GRID_HEIGHT: u8 = 20;
const START_BLOCK_SPEED_NANOSEC: u32 = 2000000000;
const END_BLOCK_SPEED_NANOSEC: u32 = 50000000;
const BLOCK_SPEED_STEP: u32 =
(START_BLOCK_SPEED_NANOSEC - END_BLOCK_SPEED_NANOSEC) / 255;
const LIN... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.