text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use alloc::vec::Vec;
use byteorder::{BigEndian, ByteOrder};
use core::convert::TryFrom;
const APDU_HEADER_LEN: usize = 4;
#[cfg_attr(test, derive(Clone, Debug))]
#[allow(non_camel_case_types, dead_code)]
#[derive(PartialEq)]
pub enum ApduStatusCode {
SW_SUCCESS = 0x90_00,
/// Command successfully executed; 'X... | the_stack |
extern crate pyo3;
extern crate uuid;
use pyo3::class::basic::CompareOp;
use pyo3::class::{PyNumberProtocol, PyObjectProtocol};
use pyo3::exceptions::{PyTypeError, PyValueError};
use pyo3::prelude::*;
use pyo3::types::{PyBytes, PyInt, PyTuple};
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hashe... | the_stack |
use alloc::sync::Arc;
use ::qlib::mutex::*;
use core::ops::Deref;
use core::any::Any;
use alloc::string::String;
use alloc::vec::Vec;
use socket::unix::transport::unix::BoundEndpoint;
use super::super::host::hostinodeop::*;
use super::super::super::qlib::common::*;
use super::super::super::qlib::device::*;
use super::... | the_stack |
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::fmt::Display;
use std::sync::Arc;
use anyhow::Result;
use thiserror::Error;
use super::grammar::ast::{self, TypeExpr};
use crate::schema::grammar::ast::Literal;
use crate::schema::grammar::ast::SchemaItem;
use serde::{Deserialize, Serialize};
#[... | the_stack |
#[cfg(feature = "mssql")]
mod mssql;
#[cfg(feature = "mysql")]
mod mysql;
#[cfg(feature = "postgresql")]
mod postgres;
#[cfg(feature = "sqlite")]
mod sqlite;
#[cfg(feature = "mssql")]
pub use self::mssql::Mssql;
#[cfg(feature = "mysql")]
pub use self::mysql::Mysql;
#[cfg(feature = "postgresql")]
pub use self::postgres... | the_stack |
use crate::structure::{Element, GraphElement, Tag};
use bit_set::BitSet;
use dyn_type::Object;
use pegasus_common::codec::{Decode, Encode};
use pegasus_common::downcast::*;
use pegasus_common::io::{ReadExt, WriteExt};
use std::cell::RefCell;
use std::collections::HashSet;
use std::fmt::Debug;
use std::io;
use std::ops:... | the_stack |
use ash::vk::{self, Handle};
pub const SCALE_FACTOR: f32 = 3.;
use crate::{
components::{panel::PanelInput, Panel},
resources::render_context::{create_push_constant, CLEAR_VALUES},
texture::Texture,
COLOR_FORMAT,
};
use super::{render_context::create_shader, RenderContext, VulkanContext};
#[derive(De... | the_stack |
mod trivial;
pub use trivial::*;
mod from_iter;
pub use from_iter::{from_iter, repeat};
pub mod of;
pub use of::{of, of_fn, of_option, of_result};
pub(crate) mod from_future;
pub use from_future::{from_future, from_future_result};
pub mod interval;
pub use interval::{interval, interval_at};
pub(crate) mod connecta... | the_stack |
use crate::mir::interpret::Scalar;
use crate::ty::{self, Ty, TyCtxt};
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
use smallvec::{smallvec, SmallVec};
use super::{
AssertMessage, BasicBlock, InlineAsmOperand, Operand, Place, SourceInfo, Successors,
SuccessorsMut,
};
pub use rustc_ast::Mutability;... | the_stack |
use whitebox_raster::*;
use whitebox_common::structures::Array2D;
use crate::tools::*;
use std::cmp::Ordering;
use std::cmp::Ordering::Equal;
use std::collections::{BinaryHeap, VecDeque};
use std::env;
use std::f64;
use std::i32;
use std::io::{Error, ErrorKind};
use std::path;
use std::sync::mpsc;
use std::sync::Arc;
u... | the_stack |
use std::{env, ffi::OsString, fmt, iter::Peekable, mem};
use anyhow::{bail, format_err, Error, Result};
use crate::{rustup, term, Cargo, Feature, Rustup};
pub(crate) struct Args<'a> {
pub(crate) leading_args: Vec<&'a str>,
pub(crate) trailing_args: &'a [String],
pub(crate) subcommand: Option<&'a str>,
... | the_stack |
use super::var::*;
use super::*;
use crate::debug_span;
use chalk_ir::cast::Cast;
use chalk_ir::fold::{Fold, Folder};
use chalk_ir::interner::{HasInterner, Interner};
use chalk_ir::zip::{Zip, Zipper};
use chalk_ir::UnificationDatabase;
use std::fmt::Debug;
use tracing::{debug, instrument};
impl<I: Interner> InferenceT... | the_stack |
use std::borrow::Cow;
use std::fmt;
use anyhow::Error;
use log::{info, trace};
use serde::Serialize;
use crate::{
license::{LicenseType, TextData},
store::{Match, Store},
};
/// A struct describing a license that was identified, as well as its type.
#[derive(Serialize, Clone)]
pub struct IdentifiedLicense<'a... | the_stack |
use std::ops::Range;
pub type Interval = Range<usize>;
/// Describes modifications of an IntervalMap after overwriting an interval.
#[derive(PartialEq, Eq, Debug)]
pub enum Mutation<V> {
/// b e
/// from: |---v-|
/// to: |-v-|
/// b'
/// Contains: ((b,e), b')
ModifiedBegi... | the_stack |
mod column_defaults_update;
mod drag_drop_update;
mod metadata;
mod replace_expression_update;
mod view;
mod view_subscription;
use self::metadata::*;
use self::view::PerspectiveOwned;
use self::view::View;
pub use self::view_subscription::TableStats;
use self::view_subscription::*;
use crate::config::*;
use crate::dr... | the_stack |
use std::{collections::BTreeSet, convert::TryFrom, io::BufWriter};
use std::io::Write;
use std::convert::TryInto;
use rand::prelude::*;
use serde::{Serialize, Deserialize};
use crate::{corpus::Corpus, error::GenericError, fuzz::{Params, Strategy}, trace};
/// Basic fuzzing strategy
#[derive(Default)]
... | the_stack |
use std::{
borrow::Cow,
collections::HashMap,
iter,
};
use once_cell::sync::Lazy;
use regex::{CaptureLocations, Regex};
pub trait StringExt {
fn replacen_in_place(&mut self, from: &str, limit: usize, to: &str) -> bool;
fn replace_in_place(&mut self, from: &str, to: &str) -> bool;
fn replacen_in_place_regex(&mut... | the_stack |
use std::fs::File;
use std::{
collections::{HashMap, HashSet},
mem::ManuallyDrop,
sync::Arc,
};
use capnp::serialize::SliceSegments;
use distill_core::{utils::make_array, AssetMetadata, AssetRef, AssetUuid};
use distill_schema::pack::pack_file;
use thread_local::ThreadLocal;
#[cfg(not(target_arch = "wasm3... | the_stack |
extern crate js_sys;
extern crate wasm_bindgen;
use std::f32;
use wasm_bindgen::prelude::*;
use web_sys::console::log_1;
#[allow(dead_code)]
fn log(s: &String) {
log_1(&JsValue::from(s));
}
static TRI_TABLE: [[i32; 16]; 256] = [
[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 8, 3, -1, 0, 0, 0, 0,... | the_stack |
use crate::cursor::{Cursor, FuncCursor};
use crate::flowgraph::ControlFlowGraph;
use crate::ir::types::I32;
use crate::ir::{self, InstBuilder, InstructionData, MemFlags};
use crate::isa::TargetIsa;
mod globalvalue;
mod heap;
mod table;
use self::globalvalue::expand_global_value;
use self::heap::expand_heap_addr;
use ... | the_stack |
/// Stream represent a IO stream.
#[cfg(not(feature = "async"))]
pub type Stream = sync_stream::Stream;
/// Stream represent a IO stream.
#[cfg(feature = "async")]
#[cfg(unix)]
pub type Stream = async_stream::AsyncStream;
#[cfg(not(feature = "async"))]
pub(super) mod sync_stream {
use super::ReaderWithBuffer;
... | the_stack |
use crossterm::{
cursor,
event::{read, Event, KeyCode},
style,
style::Attribute,
style::Color as CrossColor,
terminal,
};
use crossterm::{execute, queue};
use cursive::{theme, Printer};
use std::{
convert::{TryFrom, TryInto},
io::{Cursor, Write},
};
use std::{io::Stdout, sync::mpsc::Send... | the_stack |
use math::*;
use prop::plant::{Branch, ControlPoint, Tree};
use rand::distributions::range::SampleRange;
use rand::distributions::{self, IndependentSample};
use rand::Rng;
use std::cmp;
use std::ops::Range;
/// Parameters for the tree generator.
#[derive(Debug)]
pub struct Preset {
/// Diameter of the first branch... | the_stack |
use crate::actor::Actor;
use crate::battle::BattleRules;
use crate::character::Character;
use crate::creature::{Creature, CreatureId, RemoveCreature};
use crate::error::{WeaselError, WeaselResult};
use crate::event::{Event, EventProcessor, EventTrigger};
use crate::object::{Object, ObjectId, RemoveObject};
use crate::s... | the_stack |
#![feature(test)]
extern crate num_integer;
extern crate num_traits;
extern crate test;
use num_integer::Integer;
use num_traits::{AsPrimitive, PrimInt, WrappingAdd, WrappingMul};
use std::cmp::{max, min};
use std::fmt::Debug;
use test::{black_box, Bencher};
// --- Utilities for RNG ---------------------------------... | the_stack |
use std::{
collections::HashMap,
env, fmt, fs,
path::{Path, PathBuf},
sync::Arc,
};
use anyhow::format_err;
use arci::{JointTrajectoryClient, Localization, MoveBase, Navigation, Speaker};
#[cfg(feature = "ros")]
use arci_ros::{
RosCmdVelMoveBase, RosCmdVelMoveBaseConfig, RosControlActionClientConfi... | 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 |
clippy::module_name_repetitions,
clippy::must_use_candidate,
clippy::cast_sign_loss,
clippy::empty_enum,
clippy::used_underscore_binding,
clippy::redundant_static_lifetimes,
clippy::redundant_field_names,
unused_imports
)]
// automatically generated by the FlatBuffers compiler, do not modify... | the_stack |
use std::cell::{Cell, Ref, RefCell, RefMut};
use std::collections::HashMap;
use std::rc::Rc;
use std::sync::Arc;
use super::super::super::frontend::Module as FrontendModule;
use super::super::super::type_ast::{self as ast};
use super::super::path_to_name::path_to_name;
use super::super::vecs_equal::vecs_equal;
use sup... | the_stack |
use crate::{
proc::{ProcClass, ProcSym},
VirtAddr,
};
pub(crate) fn first_payload(class: &ProcClass, second_payload_path: &str) -> Vec<u8> {
match class {
ProcClass::ThirtyTwo => first_payload_32(second_payload_path),
ProcClass::SixtyFour => first_payload_64(second_payload_path),
}
}
p... | the_stack |
use crate::bounding_volume::{self, BoundingVolume, AABB};
use crate::math::Isometry;
use crate::pipeline::broad_phase::BroadPhaseProxyHandle;
use crate::pipeline::narrow_phase::CollisionObjectGraphIndex;
use crate::pipeline::object::CollisionGroups;
use crate::pipeline::object::GeometricQueryType;
use crate::shape::{Sh... | the_stack |
mod bitset;
pub mod model;
pub mod models;
use std::cell::{Ref, RefCell};
use std::collections::HashMap;
use std::fmt::Debug;
use std::rc::Rc;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::mpsc::{channel, Receiver, RecvTimeoutError};
use std::sync::Arc;
use std::thread;
use std::time::Duration;
use cr... | the_stack |
#[derive(Clone, serde::Deserialize)]
pub struct ModuleSpec {
name: String,
r#type: String,
config: ModuleConfig,
#[serde(rename = "imagePullPolicy", skip_serializing_if = "Option::is_none")]
image_pull_policy: Option<String>,
}
#[derive(Debug, serde::Serialize, serde::Deserialize)]
#[allow(clippy:... | the_stack |
use expectrl::{ControlCode, Session};
use std::{thread, time::Duration};
#[cfg(unix)]
use std::process::Command;
#[cfg(unix)]
use expectrl::WaitStatus;
#[cfg(windows)]
use expectrl::ProcAttr;
#[cfg(feature = "async")]
use futures_lite::{
future::block_on,
io::{AsyncBufReadExt, AsyncReadExt, AsyncWriteExt},
... | the_stack |
use crate::{
cil::{compress_token, Instruction, Method, MethodHeader},
ffi::{
mdMethodDef, mdToken, CorCallingConvention, CorElementType, CorFieldAttr, CorMethodAttr,
CorMethodImpl, CorPinvokeMap, CorTypeAttr, ModuleID, COR_SIGNATURE, E_FAIL, ULONG,
},
interfaces::ICorProfilerInfo4,
... | the_stack |
use std::{
borrow::Cow,
fmt::{self, Write as _},
io,
time::Duration,
};
use termcolor::{ColorSpec, WriteColor};
use unicode_width::UnicodeWidthChar;
use crate::{markup, Markup, MarkupElement};
/// A stack-allocated linked-list of [MarkupElement] slices
pub enum MarkupElements<'a> {
Root,
Node... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TableMember {
/// <p>The name of the table. </p>
pub name: std::option::Option<std::string::String>,
/// <p>The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and S... | the_stack |
use super::formatters::metrics_to_json;
use super::{
common::{KeyLabels, Metric, MetricAction, MetricType, MetricValue, Snapshot},
formatters::metrics_to_prometheus,
};
use super::{
ACCEPT_LIST, HISTOGRAM_BOUNDS, METRIC_COUNTER, METRIC_DESCRIPTION, METRIC_GAUGE, METRIC_HISTOGRAM, METRIC_TARGET,
};
use metri... | the_stack |
use crate::{crypto::Provider, error::Error};
use borsh::BorshDeserialize;
/// Single struct used for original data chunks (Leaves) and branch nodes (hashes of pairs of child nodes).
#[derive(Debug, PartialEq, Clone)]
pub struct Node {
pub id: [u8; HASH_SIZE],
pub data_hash: Option<[u8; HASH_SIZE]>,
pub min... | the_stack |
use chrono::prelude::{
DateTime,
Utc
};
use crate::{
convert_field_value_store_to_json_string,
FieldName,
FieldType,
FieldTypeRelationInfo,
FieldTypesStore,
FieldValue,
FieldValueRelationMany,
FieldValueRelationOne,
FieldValueScalar,
FieldValueStore,
get_field_value_f... | the_stack |
use std::fmt;
use std::result;
use std::cell::Cell;
use serde::Deserialize;
use serde::de::{self, Deserializer, IntoDeserializer};
use serde::de::{Visitor, SeqAccess, MapAccess};
use crate::Figment;
use crate::error::{Error, Kind, Result};
use crate::value::{Value, Num, Empty, Dict, Tag};
pub struct ConfiguredValueD... | the_stack |
use crate::connectors::{
prelude::*,
utils::{mime::MimeCodecMap, tls::TLSServerConfig},
};
use crate::{connectors::spawn_task, errors::err_conector_def};
use async_std::channel::unbounded;
use async_std::{
channel::{bounded, Receiver, Sender},
task::JoinHandle,
};
use dashmap::DashMap;
use halfbrown::{E... | the_stack |
use crate::{
syscall::{Syscall, SyscallId},
ty::{Dir, ResKind, ResType, Type, TypeId, TypeKind},
HashMap, HashSet,
};
#[derive(Debug, Clone)]
pub struct Target {
/// Name of target os.
os: Box<str>,
/// Target arch.
arch: Box<str>,
/// Ptr size of target arch.
ptr_sz: u64,
/// P... | the_stack |
use crate::binding::*;
use crate::chkerr;
use crate::io::SeekInChars;
use crate::new_odpi_str;
use crate::sql_type::FromSql;
use crate::sql_type::OracleType;
use crate::sql_type::ToSql;
use crate::sql_type::ToSqlNull;
use crate::to_odpi_str;
use crate::Connection;
use crate::Context;
use crate::Result;
use crate::SqlVa... | the_stack |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed unde... | the_stack |
use std::{
convert::TryInto,
future::Future,
io::{Read, Write},
time::Duration,
};
use anyhow::Result;
use wasmtime::{Caller, FuncType, Linker, Trap, ValType};
use crate::{
api::{error::IntoTrap, get_memory},
message::{DataMessage, Message},
process::Signal,
state::ProcessState,
};
us... | the_stack |
use std;
use std::io::Cursor;
use std::net::SocketAddr;
use std::sync::{Arc, RwLock};
use std::thread;
use byteorder::*;
use chrono::prelude::*;
use num_cpus;
use uuid::Uuid;
use assembler::{PIE_HEADER_LENGTH, PIE_HEADER_PREFIX};
use cluster;
use cluster::manager::Manager;
use instruction::Opcode;
use std::f64::EPSIL... | the_stack |
//! Uses [Chrono](https://docs.rs/chrono) for dates and times.
use crate::pac::{EXTI, PWR, RCC, RTC};
use core::convert::TryInto;
use cortex_m::interrupt::free;
use chrono::{Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike};
use cfg_if::cfg_if;
// todo: QC use of ICSR vice SR and ISR wherever used in this m... | the_stack |
use super::help_view::HasHelpView;
use super::list_view::*;
use super::text_view;
use super::{article_view, async_view};
use crate::prelude::*;
use crate::view::text_view::StyledPaddingChar;
use crate::view::text_view::TextPadding;
type CommentComponent = HideableView<PaddedView<text_view::TextView>>;
/// CommentView... | the_stack |
use std::cell::{Cell, RefCell};
use std::rc::{Rc, Weak};
use std::collections::HashMap;
use std::result::Result;
use handle_table::Handle;
use {EventLoop, TaskReaper};
pub mod promise_node;
thread_local!(pub static EVENT_LOOP: RefCell<Option<EventLoop>> = RefCell::new(None));
pub fn with_current_event_loop<F, R>(f: ... | the_stack |
use std::net::{TcpListener, TcpStream, SocketAddr, Shutdown};
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use std::fs;
use std::fs::OpenOptions;
use std::io::Write;
use deflate::Compression;
use deflate::write::ZlibEncoder;
use std::io::prelude::*;
use makepad_http::channel::WebSocketChannels;
use mak... | the_stack |
use std::collections::HashMap;
use std::io::{BufRead, BufReader, Read, Write};
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
use cargo::core::compiler::unit_graph::UnitDep;
use cargo::core::compiler::unit_graph::UnitGraph;
use cargo::core::compiler::Unit;
u... | the_stack |
use {
anyhow::{format_err, Error},
bt_rfcomm::profile::is_rfcomm_protocol,
fidl_fuchsia_bluetooth_bredr as bredr,
fuchsia_bluetooth::{
profile::{psm_from_protocol, Attribute, ProtocolDescriptor, Psm},
types::{PeerId, Uuid},
},
std::{collections::HashSet, convert::TryFrom},
};
us... | the_stack |
use distill::loader::{
crossbeam_channel::Sender,
handle::{AssetHandle, RefOp, TypedAssetStorage},
storage::{AssetLoadOp, AssetStorage, IndirectionTable, LoaderInfoProvider},
AssetTypeId, LoadHandle,
};
use std::{collections::HashMap, error::Error, sync::Mutex};
use crossbeam_channel::Receiver;
use dis... | the_stack |
use daachorse::charwise::CharwiseDoubleArrayAhoCorasickBuilder;
use daachorse::{DoubleArrayAhoCorasickBuilder, Match, MatchKind};
/// The following test suites are copied from
/// [aho-corasick crate](https://github.com/BurntSushi/aho-corasick/blob/master/src/tests.rs),
/// although duplicate and empty patterns are re... | the_stack |
use crate::rules::{CustomRules, CARD_VALUE_STAT, PLAY_CARD_ABILITY};
use crate::tcp::{TcpClient, TcpServer};
use rand::{seq::SliceRandom, thread_rng};
use std::convert::TryInto;
use std::sync::{Arc, Mutex};
use std::{io::Read, thread, time};
use weasel::round::TurnsCount;
use weasel::team::TeamId;
use weasel::{
Act... | the_stack |
use serde::{Deserialize, Serialize};
use tracing::warn;
use crate::{
collections::{FillVecMap, P2ps, VecMap},
crypto_tools::{constants, hash, k256_serde::point_to_bytes, paillier, vss, zkp::schnorr},
gg20::keygen::{r4, SecretKeyShare},
sdk::{
api::{Fault::ProtocolFault, TofnFatal, TofnResult},
... | the_stack |
use crate::{
field::FieldGeneratorSet,
specification,
substitution::Substitute,
tag::{Tag, TagGeneratorSet},
DataGenRng, RandomNumberGenerator,
};
use influxdb2_client::models::DataPoint;
use itertools::Itertools;
use snafu::{ResultExt, Snafu};
use std::fmt;
/// Measurement-specific Results
pub ty... | the_stack |
use once_cell::sync::OnceCell;
use redis::aio::ConnectionManager;
use sqlx::postgres::PgPool;
use std::{env, fmt};
static REDIS: OnceCell<RedisManager> = OnceCell::new();
static POSTGRES: OnceCell<PgPool> = OnceCell::new();
pub struct RedisManager {
pool: ConnectionManager,
script: Option<redis::Script>,
}
i... | the_stack |
use std::io;
use std::path::Path;
use std::process::Command;
use std::collections::{VecDeque, BTreeSet};
use rand::{Rng, SeedableRng};
use rand::rngs::StdRng;
/// Order to consume bytes from the input during graph construction
const INPUT_ALLOCATION: InputAllocation = InputAllocation::Reverse;
/// Max size of all fuz... | the_stack |
extern crate rand;
use rand::{Rng, SeedableRng};
extern crate rand_chacha;
use rand_chacha::ChaCha8Rng;
use std::cmp::{Ord, PartialOrd, Eq, Ordering};
use std::collections::BinaryHeap;
use std::collections::binary_heap;
/// Weighted samples stored in a stream sampler.
///
/// Weighted samples store a value along wit... | the_stack |
extern crate futures;
extern crate tokio_core;
extern crate tokio_chat_common;
use std::cell::RefCell;
use std::rc::Rc;
use std::collections::HashMap;
use std::io;
use std::net::SocketAddr;
use tokio_core::io::Io;
use tokio_core::reactor::Core;
use tokio_core::net::TcpListener;
use futures::{Stream, Sink, Future};
use... | the_stack |
use audio::{AudioData, Operation as AudioOperation};
use camera::Projection;
use color::{self, Color};
use light::{LightOperation, ShadowMap, ShadowProjection};
use material::Material;
use mesh::DynamicMesh;
use node::{NodeInternal, NodePointer, TransformInternal};
use object::Base;
use render::{BackendResources, GpuD... | the_stack |
use std::collections::{HashMap, HashSet};
use std::io::Error;
use std::rc::Rc;
use crate::Module;
use sulis_core::resource::{ResourceSet, Sprite};
use sulis_core::util::{gen_rand, invalid_data_error, unable_to_create_error, Point, Size};
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct... | the_stack |
#[macro_use]
extern crate scopeguard;
#[macro_use]
extern crate lazy_static;
extern crate bson;
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate mongodb;
#[macro_use]
extern crate magnet_derive;
extern crate magnet_schema;
#[macro_use]
extern crate avocado_derive;
extern crate avocado;
use std:... | the_stack |
use hash_db::{HashDB, Hasher};
use hex_literal::hex;
use reference_trie::test_layouts;
use trie_db::{
node::{Node, Value},
DBValue, NibbleSlice, NibbleVec, TrieDB, TrieDBNodeIterator, TrieError, TrieIterator,
TrieLayout, TrieMut,
};
type MemoryDB<T> = memory_db::MemoryDB<
<T as TrieLayout>::Hash,
memory_db::Prefi... | the_stack |
pub mod types;
pub mod utils;
pub mod connection;
pub mod init;
use futures::{
Future,
Stream,
Sink
};
use futures::sync::mpsc::UnboundedSender;
use futures::sync::oneshot::{
Sender as OneshotSender,
channel as oneshot_channel
};
use crate::utils as client_utils;
use std::ops::{
Deref,
DerefMut
};
use... | the_stack |
use glib::translate::*;
use glib::value::FromValue;
use glib::value::ToValue;
use glib::StaticType;
use glib::Type;
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPAddressPoolResult")]
pub enum RTSPAddressPoolResult {
#[doc(alias = "GST_RTSP_ADDRESS_POOL_... | the_stack |
use crate::err::{self, PyErr, PyResult};
#[cfg(Py_LIMITED_API)]
use crate::types::PyIterator;
use crate::{
ffi, AsPyPointer, FromPyObject, IntoPy, PyAny, PyObject, Python, ToBorrowedObject, ToPyObject,
};
use std::cmp;
use std::collections::{BTreeSet, HashSet};
use std::{collections, hash, ptr};
/// Represents a P... | the_stack |
extern crate timely;
extern crate alg3_dynamic;
use std::sync::{Arc, Mutex};
use std::io::BufReader;
use std::error::Error;
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
use timely::dataflow::operators::*;
use alg3_dynamic::*;
type Node = u32;
fn main () {
let start = std::time::Instant::no... | the_stack |
use crate::{
agents::Agent,
errors::AtomicError,
hierarchy,
schema::{Class, Property},
};
use crate::{errors::AtomicResult, parse::parse_json_ad_array};
use crate::{mapping::Mapping, values::Value, Atom, Resource};
// A path can return one of many things
pub enum PathReturn {
Subject(String),
A... | the_stack |
use crate::stateful::decode;
use dicom_core::header::{DataElementHeader, HasLength, Length, VR};
use dicom_core::value::{DicomValueType, PrimitiveValue};
use dicom_core::{value::Value, DataElement, Tag};
use snafu::{OptionExt, ResultExt, Snafu};
use std::fmt;
pub mod lazy_read;
pub mod read;
pub mod write;
pub use se... | the_stack |
use bytes::Bytes;
use futures::{StreamExt, TryStreamExt};
use generated_types::influxdata::iox::catalog::v1 as proto;
use iox_object_store::{IoxObjectStore, ParquetFilePath, TransactionFilePath};
use object_store::{ObjectStore, ObjectStoreApi};
use observability_deps::tracing::{info, warn};
use parking_lot::RwLock;
use... | the_stack |
use crate::codegen_cprover_gotoc::GotocCtx;
use cbmc::goto_program::{DatatypeComponent, Expr, Location, Parameter, Symbol, SymbolTable, Type};
use cbmc::utils::aggr_tag;
use cbmc::{btree_map, NO_PRETTY_NAME};
use cbmc::{InternString, InternedString};
use rustc_ast::ast::Mutability;
use rustc_index::vec::IndexVec;
use r... | the_stack |
mutable_transmutes,
non_camel_case_types,
non_snake_case,
non_upper_case_globals
)]
use euclid::point2;
use super::dpx_dvi::{
dvi_close, dvi_comment, dvi_do_page, dvi_init, dvi_npages, dvi_reset_global_state,
dvi_scan_specials, dvi_set_verbose, ReadLength,
};
use super::dpx_pdfdev::{
pdf_close... | the_stack |
use std::{
borrow::Cow,
collections::HashSet,
marker::PhantomData,
};
use example_0_interface::{
RemoveWords, CowStrIter,
TextOpsMod_Ref,TextOpsMod,
DeserializerMod, DeserializerMod_Ref,
TOState, TOStateBox,TOCommand,TOReturnValue,TOCommandBox,TOReturnValueArc,
};
use abi_stable::{
ext... | the_stack |
use anyhow::{anyhow, bail, Result};
use base64::encode;
use cookie::Cookie;
// use futures_util::AsyncWriteExt;
use md5::{Digest, Md5};
use rand::rngs::OsRng;
use reqwest::header;
use reqwest_cookie_store::CookieStoreMutex;
use rsa::{pkcs8::FromPublicKey, PaddingScheme, PublicKey, RsaPublicKey};
use serde::ser::Error;
... | the_stack |
// File-specific allowances to silence internal warnings of `[pyclass]`.
#![allow(clippy::used_underscore_binding)]
/// This crate is a wrapper around the engine crate which exposes a Python module via PyO3.
use std::any::Any;
use std::cell::RefCell;
use std::collections::hash_map::HashMap;
use std::collections::{BTre... | the_stack |
use contracts::debug_ensures;
use num_bigint::BigInt;
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::sync::Arc;
use crate::lang::core::{
FieldDeclaration, FieldDefinition, Globals, LocalLevel, LocalSize, Locals, Primitive, Sort,
Term, TermData,
};
use crate::lang::Located;
/// Evaluat... | the_stack |
use bytes;
use io::*;
use util::{PoisonLock, Pos, ReadConst};
use {TokenReaderError, TokenWriterError};
use binjs_shared::{FieldName, InterfaceName, SharedString};
use std;
use std::cell::RefCell;
use std::io::{Read, Seek};
use std::rc::Rc;
use clap;
/// The state of the `TreeTokenReader`.
///
/// Use a `PoisonLock... | the_stack |
use pest::prelude::*;
impl_rdp! {
grammar! {
statement = _{ something ~ asm_comment ~ eoi | asm_comment }
something = _{ a_declaration | a_directive | an_instruction | just_label }
a_declaration = { symbol ~ (["="] | [i"equ"] | [i".equ"] ) ~ expression ~ asm_comment? }
a_directive =... | the_stack |
use rustling::*;
use rustling_ontology_values::dimension::*;
use rustling_ontology_values::helpers;
use rustling_ontology_moment::{Weekday, Grain};
pub fn rules_datetime(b: &mut RuleSetBuilder<Dimension>) -> RustlingResult<()> {
b.rule_2("intersect",
datetime_check!(|datetime: &DatetimeValue| !datetim... | the_stack |
//! Contains types and related functions.
use crate::{
ast::QualifiedSymbol,
model::{GlobalEnv, ModuleId, StructEnv, StructId},
symbol::{Symbol, SymbolPool},
};
use move_binary_format::{file_format::TypeParameterIndex, normalized::Type as MType};
use move_core_types::language_storage::{StructTag, TypeTag}... | the_stack |
//! Commands for console interaction.
use crate::console::readline::read_line;
use crate::console::{CharsXY, ClearType, Console, ConsoleClearable, Key};
use async_trait::async_trait;
use endbasic_core::ast::{ArgSep, Expr, Value, VarType};
use endbasic_core::exec::Machine;
use endbasic_core::syms::{
CallError, Call... | the_stack |
use td_rlua::{self, LuaPush, Lua, LuaRead};
use td_rp;
use td_rredis::{self, Cmd, Script};
use libc;
use {DbTrait, DbPool, PoolTrait, RedisPool};
use {LuaEngine, NetMsg, NetConfig, LuaWrapperTableValue, RedisWrapperCmd, RedisWrapperResult,
RedisWrapperMsg, RedisWrapperVecVec};
use {ThreadUtils, LogUtils, log_util... | the_stack |
use uni_gl;
use uni_gl::*;
use image::{RgbImage, RgbaImage};
use engine::asset::{Asset, AssetResult, AssetSystem, FileFuture, LoadableAsset, Resource, DDS};
use std::cell::{Cell, RefCell};
use std::path::Path;
use std::rc::Rc;
#[derive(Debug, Copy, Clone)]
pub enum TextureFiltering {
Nearest,
Li... | the_stack |
//! A hybrid CPU-GPU renderer that only relies on functionality available in Direct3D 9.
//!
//! This renderer supports OpenGL at least 3.0, OpenGL ES at least 3.0, Metal of any version, and
//! WebGL at least 2.0.
use crate::gpu::blend::{BlendModeExt, ToBlendState};
use crate::gpu::perf::TimeCategory;
use crate::gpu... | 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 |
cfg_async! {
use crate::{
channel::Receiver,
commands,
connector::Connector,
encoder::AsyncEncoder,
messages::{Capability, Commands, MessageId},
rate_limit::{RateClass, RateLimit},
twitch::UserConfig,
util::{Notify, NotifyHandle},
writer::{AsyncWriter, MpscWriter},
AsyncDecoder, ... | the_stack |
use crate::js::cell::WasmCell;
use crate::js::{externals::Memory, FromToNativeWasmType};
use std::{fmt, marker::PhantomData, mem};
use wasmer_types::ValueType;
/// The `Array` marker type. This type can be used like `WasmPtr<T, Array>`
/// to get access to methods
pub struct Array;
/// The `Item` marker type. This is ... | the_stack |
use crate::{mock_tree_store::MockTreeStore, node_type::LeafNode, JellyfishMerkleTree};
use diem_crypto::{
hash::{CryptoHash, SPARSE_MERKLE_PLACEHOLDER_HASH},
HashValue,
};
use diem_crypto_derive::{BCSCryptoHash, CryptoHasher};
use diem_types::{
proof::{SparseMerkleInternalNode, SparseMerkleRangeProof},
... | the_stack |
use alloc::vec::Vec;
use alloc::boxed::Box;
use alloc::collections::btree_map::BTreeMap;
use super::super::task::*;
use super::super::qlib::common::*;
use super::super::qlib::linux_def::*;
use super::super::qlib::linux::time::*;
use super::super::SignalDef::*;
use super::super::syscalls::syscalls::*;
use super::super:... | the_stack |
use ttf_parser::{Tag, GlyphId};
use ttf_parser::opentype_layout::{LayoutTable, GlyphClass};
use crate::Variation;
use crate::ot::{TableIndex, PositioningTable, SubstitutionTable};
use crate::buffer::GlyphPropsFlags;
use crate::tables::{ankr, feat, kern, kerx, morx, trak};
// https://docs.microsoft.com/en-us/typograp... | the_stack |
mod error;
pub use error::*;
use cloudevents::{binding::rdkafka::MessageExt, AttributesReader, AttributesWriter, Data, Event};
use drogue_cloud_service_api::kafka::KafkaConfig;
use futures::{
task::{Context, Poll},
Stream, StreamExt,
};
use owning_ref::OwningHandle;
use rdkafka::{
config::{ClientConfig, R... | the_stack |
//! Hashes video frames.
use async_trait::async_trait;
use fidl_fuchsia_media::*;
use fidl_fuchsia_sysmem as sysmem;
use hex::encode;
use mundane::hash::{Digest, Hasher, Sha256};
use std::{convert::*, fmt};
use stream_processor_test::{ExpectedDigest, FatalError, Output, OutputPacket, OutputValidator};
use thiserror::E... | the_stack |
pub const SMALLEST_POWER_OF_FIVE: i32 = -342;
pub const LARGEST_POWER_OF_FIVE: i32 = 308;
pub const N_POWERS_OF_FIVE: usize = (LARGEST_POWER_OF_FIVE - SMALLEST_POWER_OF_FIVE + 1) as usize;
// Use static to avoid long compile times: Rust compiler errors
// can have the entire table compiled multiple times, and then
// ... | the_stack |
pub struct ListAccountsPaginator<
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::list_accounts_input::Builder,
}
impl<C, M, R> ListAccoun... | the_stack |
extern crate memmap;
use bincode;
use std::sync::atomic;
use std::{io, fs, mem, path};
use std::io::Write;
use timer::Timer;
use header;
use io::*;
use values::*;
/// Any `HashStoreError` returned indicates corruption of the database
/// or a non-recoverable IO problem
#[derive(Debug)]
pub enum HashStoreError {
... | the_stack |
use kernel::prelude::*;
use kernel::lib::mem::aref::{Aref,ArefBorrow};
use kernel::sync::Mutex;
use kernel::_async3 as async;
use core::sync::atomic::{Ordering,AtomicBool};
pub type MacAddr = [u8; 6];
#[derive(Debug)]
pub enum Error
{
/// No packets waiting
NoPacket,
/// An oversized packet was received
MtuExceed... | the_stack |
/// Unpack 32 values with bit width `num_bits` from `in_ptr`, and write to `out_ptr`.
/// Return the `in_ptr` where the starting offset points to the first byte after all the
/// bytes that were consumed.
// TODO: may be better to make these more compact using if-else conditions.
// However, this may require const gen... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.