text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
#![deny(non_snake_case)]
#[macro_use] extern crate rocket;
use std::path::PathBuf;
use rocket::request::Request;
use rocket::http::ext::Normalize;
use rocket::local::blocking::Client;
use rocket::data::{self, Data, FromData};
use rocket::http::{Status, RawStr, ContentType, uri::fmt::Path};
// Use all of the code ge... | the_stack |
use crate::efuse_ecc::efuse_ecc::*;
use crate::{JtagMach, JtagChain, JtagEndian, JtagLeg};
/// There are 13 banks of fuses, 12 of which (key/user) are "hamming" ECC, 1 of which (config) is "dup" ECC.
pub struct EfusePhy {
banks: [u32; 13],
key: [u8; 32],
user: u32,
cntl: u8,
}
const FUSE_BANKS: usize ... | the_stack |
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub unsafe fn as_ptr(&self) -> *const T {
... | the_stack |
use std::{
collections::{HashMap, VecDeque},
ops::{Index, IndexMut},
};
use crate::{
graph::{GraphIndex, NodeIndex},
visit::{EdgeRef, GraphProp, IntoEdgeReferences},
Directed,
};
use self::linked_list::{LinkedList, LinkedListEntry};
/// \[Generic\] Finds a [feedback arc set]: a set of edges in th... | the_stack |
use itertools::Itertools;
use buffer::*;
use config;
use rayon::prelude::*;
use slog;
use store;
use store::{TxPtr,BlockHeaderPtr};
use store::flatfileset::FlatFileSet;
use store::hash_index::{HashIndex,HashIndexGuard};
use store::spend_index::SpendIndex;
use transaction::Transaction;
pub mod record;
pub use self... | the_stack |
use rand::rngs::StdRng;
use std::sync::Arc;
use crate::kdtree::{Bounded, BoundingBox};
pub use cube::Cube;
pub use mesh::{Mesh, Triangle};
pub use monomial_surface::MonomialSurface;
pub use plane::Plane;
pub use sphere::Sphere;
mod cube;
mod mesh;
mod monomial_surface;
mod plane;
mod sphere;
/// Represents a physica... | the_stack |
use crate::{
channel::Channel,
channels::Channels,
configuration::Configuration,
connection_closer::ConnectionCloser,
connection_properties::ConnectionProperties,
connection_status::{ConnectionState, ConnectionStatus, ConnectionStep},
frames::Frames,
heartbeat::Heartbeat,
internal_rp... | the_stack |
use regex::Regex;
use rio_turtle::TurtleFormatter;
use sophia_api::dataset::{Dataset, MutableDataset};
use sophia_api::ns::{rdf, xsd};
use sophia_api::prefix::{PrefixBox, PrefixMap};
use sophia_api::serializer::*;
use sophia_api::term::{TTerm, TermKind::*};
use sophia_api::triple::stream::{SinkError, SourceError, Strea... | the_stack |
use std::mem;
use crate::rules::{
ArmorKind, Attribute, Damage, DamageKind, HitKind, Slot, WeaponKind, WeaponStyle
};
use sulis_core::util::ExtInt;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)]
#[serde(deny_unknown_fields)]
#[serde(rename_all = "snake_case")]
pub enum BonusKind {
Attr... | the_stack |
use core::ops::Deref;
use std::collections::{HashMap, VecDeque};
use std::convert::TryFrom;
use std::sync::atomic::{AtomicBool, Ordering::Relaxed};
use std::sync::Arc;
use std::time::{Duration, Instant};
use async_trait::async_trait;
use log::{debug, error, info, trace, warn};
use reqwest::Client;
use tokio::sync::RwL... | the_stack |
use crate::client::{Client, Workload};
use crate::command::{Command, CommandResult, DEFAULT_SHARD_ID};
use crate::config::Config;
use crate::executor::{ExecutionOrderMonitor, Executor, ExecutorMetrics};
use crate::id::{ClientId, ProcessId, ShardId};
use crate::metrics::Histogram;
use crate::planet::{Planet, Region};
us... | the_stack |
pub fn misc() {
threads();
thread_testcase();
channels();
path();
file_open();
file_create();
file_read_lines();
child_processes();
child_processes_pipes();
child_processes_wait();
filesystem_operations();
program_arguments();
argument_parsing();
foreign_function_... | the_stack |
use crate::data::{DynamoBot, DynamoBotBincode, DynamoDbClient};
use crate::db_connectors::dynamodb::utils::*;
use crate::db_connectors::{
dynamodb::{aws_s3, Bot, BotKeys, Class, DynamoDbKey},
BotVersion,
};
use crate::EngineError;
use csml_interpreter::data::{csml_bot::Module, csml_flow::CsmlFlow};
use rusoto_d... | the_stack |
use std::any::Any;
use std::cell::RefCell;
use std::panic::{self, AssertUnwindSafe, UnwindSafe};
use context::Context;
use context::stack::{Stack, ProtectedFixedSizeStack};
use futures::{Async, Future, Poll};
use futures::unsync::oneshot::{self, Receiver};
use errors::{Dropped, StackError, TaskFailed};
use switch::{S... | the_stack |
mod content_decoders;
mod prelude_decoders;
use self::content_decoders::*;
use self::prelude_decoders::*;
use super::probabilities::SymbolIndex;
use super::rw::*;
use super::util::*;
use bytes::decoders::*;
use io::{FileStructurePrinter, Path, TokenReader};
use statistics::PerUserExtensibleKind;
use TokenReaderError;... | the_stack |
use crate::full_inference::analysis::dump::DumpCx;
use crate::full_inference::analysis::kind_inference::KindInference;
use crate::full_inference::analysis::AnalysisIr;
use crate::full_inference::analysis::Node;
use crate::full_inference::analysis::Path;
use crate::full_inference::Perm;
use crate::HirLocation;
use crate... | the_stack |
use crate::{
aes::BLOCK_LEN,
aesgcm::{testing, NONCE_LEN, TAG_LEN},
testing::{Outcome, MAX_PAYLOAD},
};
use bolero::{check, generator::*};
use core::{convert::TryInto, fmt};
use pretty_hex::{pretty_hex, simple_hex};
#[derive(TypeGenerator)]
struct Input<const KEY_LEN: usize> {
key: [u8; KEY_LEN],
n... | the_stack |
use crate::network_monitor::monitor::summary_producer::NodeResult;
use crate::node_status_api::models::{
GatewayStatusReport, GatewayUptimeHistory, MixnodeStatusReport, MixnodeUptimeHistory,
NodeStatusApiError,
};
use crate::node_status_api::{ONE_DAY, ONE_HOUR};
use crate::storage::manager::StorageManager;
use ... | the_stack |
// Locals
use super::{AuthActivity, Context, FileTransferProtocol, InputMask};
use crate::filetransfer::params::ProtocolParams;
use crate::filetransfer::FileTransferParams;
use crate::ui::components::bookmark_list::{BookmarkList, BookmarkListPropsBuilder};
use crate::utils::ui::draw_area_in;
// Ext
use tui_realm_stdlib... | the_stack |
mod common;
use chrono::{DateTime, FixedOffset, NaiveDate, NaiveDateTime, TimeZone, Utc};
use chrono_tz::Tz;
use common::get_tb_mysql_pool;
use mysql::prelude::*;
use mysql_common::bigdecimal::BigDecimal;
#[tokio::test]
async fn tests_mysql_integ_stress_test_ddl() {
let pool = get_tb_mysql_pool();
let mut conn... | the_stack |
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]
#![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_case_globals)]
#![allow(trivial_cast... | the_stack |
use crate::error::{FILE_NOT_EXISTS_ERROR, INVALID_BOM_FILE_ERROR};
use crate::util::{
check_file_hash, copy_dir, copy_file, copy_shared_object, create_link, dest_in_root,
find_dependent_shared_objects, find_included_bom_file, infer_default_loader, mkdir,
resolve_envs,
};
use serde::{Deserialize, Serialize};... | the_stack |
use crate::action_plugins::ntp::common::{
get_ntp_config_stream, MARKER, NTP_CONFIG_FILE, PREFIX, REMOVE_MARKER,
};
use crate::agent_error::ImlAgentError;
use futures::{future, Future, Stream, TryFutureExt, TryStreamExt};
/// Writes the new config data to the config file
pub async fn update_and_write_new_config(se... | the_stack |
use std::{mem::size_of, sync::Arc};
use glam::{IVec3, Vec3};
use kajiya_backend::{
ash::vk,
vulkan::{
buffer::{Buffer, BufferDesc},
image::*,
ray_tracing::RayTracingAcceleration,
shader::{
create_render_pass, RenderPass, RenderPassAttachmentDesc, RenderPassDesc, Shad... | the_stack |
use crate::config::CFG;
use crate::error::NoteError;
use crate::error::WorkflowError;
use crate::file_editor::launch_editor;
use crate::filename;
use crate::filename::MarkupLanguage;
use crate::note::Note;
use crate::note::TMPL_VAR_FM_;
use crate::note::TMPL_VAR_FM_FILENAME_SYNC;
use crate::note::TMPL_VAR_FM_NO_FILENAM... | the_stack |
pub mod commands;
pub mod output;
use log::info;
use std::ffi::OsString;
use std::path::Path;
use std::path::PathBuf;
use std::process::{Child, ChildStdin, Command, Stdio};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{mpsc, Arc};
use std::thread;
type Token = u64;
pub struct GDB {
pub process: ... | the_stack |
use crate::mesh::Vertex;
use nalgebra::Matrix4;
use palette::{encoding::srgb::Srgb, rgb::Rgb, Hsv, RgbHue};
use std::iter;
fn identity() -> Matrix4<f32> {
Matrix4::new(
1.0, 0.0, 0.0, 0.0, //
0.0, 1.0, 0.0, 0.0, //
0.0, 0.0, 1.0, 0.0, //
0.0, 0.0, 0.0, 1.0,
)
}
/// An ergonomic... | the_stack |
use anyhow::{bail, ensure, Result};
use bitvec_helpers::{bitvec_reader::BitVecReader, bitvec_writer::BitVecWriter};
const DISTRIBUTION_INDEXES_9: &[u8] = &[1, 5, 10, 25, 50, 75, 90, 95, 99];
const DISTRIBUTION_INDEXES_10: &[u8] = &[1, 5, 10, 25, 50, 75, 90, 95, 98, 99];
#[derive(Debug, Clone, Default)]
pub struct Hdr... | the_stack |
#![no_std]
#![no_main]
#![feature(global_asm, llvm_asm, asm, alloc_error_handler)]
#![feature(drain_filter)]
#![feature(maybe_uninit_uninit_array)]
#![feature(naked_functions)]
#![feature(maybe_uninit_ref)]
#![feature(linked_list_remove)]
#![feature(core_intrinsics)]
#![deny(warnings)]
#[macro_use]
extern crate alloc;... | the_stack |
#![feature(attr_literals)]
#![allow(unknown_lints)]
extern crate chrono;
#[macro_use]
extern crate fix_rs;
#[macro_use]
extern crate fix_rs_macros;
use chrono::offset::utc::UTC;
use chrono::TimeZone;
use std::any::Any;
use std::collections::HashMap;
use fix_rs::byte_buffer::ByteBuffer;
use fix_rs::dictionary::field_... | the_stack |
use std::{
cell::RefCell,
sync::{Arc, Mutex},
thread::JoinHandle,
};
use engine_rocks::{RocksEngine, RocksEngineIterator, RocksWriteBatch};
use engine_traits::{
IterOptions, Iterable, Iterator, Mutable, SeekKey, WriteBatch, WriteBatchExt, CF_DEFAULT,
CF_LOCK, CF_WRITE,
};
use txn_types::{Key, TimeS... | the_stack |
use rustc::mir;
use rustc::ty::{self, Ty};
use rustc_apfloat::ieee::{Single, Double};
use rustc_apfloat::Float;
use std::cmp::Ordering;
use syntax::ast::FloatTy;
use error::{EvalError, EvalResult};
use eval_context::{EvalContext, ValTy};
use place::Place;
use memory::{MemoryPointer, PointerOffset, SByte};
use value::{... | the_stack |
#![crate_name="theca"]
#![crate_type="lib"]
#![feature(core)]
#![feature(libc)]
#![feature(collections)]
#![feature(old_io)]
#![feature(rustc_private)]
#![feature(os)]
#![feature(fs_time)]
#![feature(path_ext)]
//! Definitions of ThecaItem and ThecaProfile and their implementations
extern crate core;
extern crate li... | the_stack |
use crate::{
formatting::{hex_as_ascii, ForEscaping, FormattingFlags, NumberFormatting, FOR_ESCAPING},
utils::{min_usize, saturate_range, Constructor},
wrapper_types::{AsciiStr, PWrapper},
};
use super::{Error, Formatter, StrWriter};
use core::{marker::PhantomData, ops::Range};
/// For writing a formatte... | the_stack |
mod address;
use std::sync::Arc;
use serde::{Deserialize, Serialize};
pub use address::EndpointAddress;
type EndpointMetadata = crate::metadata::MetadataView<Metadata>;
/// A destination endpoint with any associated metadata.
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone, PartialOrd, Eq)]
#[non_exhausti... | the_stack |
use core::cmp;
use core::u16;
use core::u8;
use crate::dir_entry::DIR_ENTRY_SIZE;
use crate::error::{Error, IoError};
use crate::fs::{FatType, FormatVolumeOptions, FsStatusFlags};
use crate::io::{Read, ReadLeExt, Write, WriteLeExt};
use crate::table::RESERVED_FAT_ENTRIES;
const BITS_PER_BYTE: u32 = 8;
const KB_32: u3... | the_stack |
mod codec;
pub mod dump;
use std::fs::create_dir_all;
use std::path::Path;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::{
collections::{BTreeMap, HashSet},
path::PathBuf,
time::Duration,
};
use arc_swap::ArcSwap;
use heed::types::{ByteSlice, OwnedType, SerdeJson};
use heed::... | the_stack |
use std::convert::Infallible;
use std::fmt;
use std::sync::{Arc, Mutex};
use std::{collections::HashSet, sync::PoisonError};
use itertools::Itertools;
use serde::Serialize;
use slog::{error, info, Logger};
use warp::http::StatusCode;
use warp::{reject, Rejection, Reply};
use crate::node_runner::{LightNodeRunnerError,... | the_stack |
use hir::known;
use ide_db::helpers::FamousDefs;
use stdx::format_to;
use syntax::{
ast::{self, edit_in_place::Indent, make, HasArgList, HasLoopBody},
AstNode,
};
use crate::{AssistContext, AssistId, AssistKind, Assists};
// Assist: convert_iter_for_each_to_for
//
// Converts an Iterator::for_each function in... | the_stack |
use proc_macro2::{Group, Ident, Literal, Span, TokenStream, TokenTree};
use std::collections::{HashMap, HashSet};
use quote::{format_ident, quote, quote_spanned};
pub use self::Expr::*;
use crate::analysis;
use crate::ast::*;
pub fn report_error(span: Span, msg: String) -> TokenStream {
quote_spanned!(span=>comp... | the_stack |
use super::ast::*;
use super::hir::{self, Constructor, DeBruijn, HirId};
use super::stack::Stack;
use super::syntax::visit::*;
use std::collections::{HashMap, HashSet};
use std::iter::IntoIterator;
/// Validate that a [`Program`] is closed, e.g. it has no free
/// term or type variables. We traverse the program in exe... | the_stack |
unused_imports,
non_snake_case,
non_camel_case_types,
non_upper_case_globals,
unused_parens,
non_shorthand_field_patterns,
dead_code,
overflowing_literals,
unreachable_patterns,
unused_variables,
clippy::missing_safety_doc,
clippy::toplevel_ref_arg,
clippy::double_parens,... | the_stack |
use std::collections::HashMap;
use std::convert::TryFrom;
use near_contract_standards::fungible_token::metadata::FungibleTokenMetadata;
use near_sdk::json_types::{ValidAccountId, U128};
use near_sdk::AccountId;
use near_sdk_sim::transaction::ExecutionStatus;
use near_sdk_sim::{
call, deploy, init_simulator, to_yoc... | the_stack |
use serde_json;
use chrono::UTC;
use rand;
use std::path::{Path, PathBuf};
use std::fs::File;
use std::io::prelude::*;
use std::collections::{HashMap, BTreeMap};
use std::collections::BTreeSet;
use std::fmt;
use super::{CliError, LalResult, input};
/// Representation of a docker container image
#[derive(Serialize, ... | the_stack |
use {
crate::hanging_get::error::HangingGetServerError,
core::hash::Hash,
parking_lot::Mutex,
std::{collections::HashMap, sync::Arc},
};
/// A broker used to create `Publishers` and `Subscribers` of updates to some state.
pub struct HangingGet<S, O, F: Fn(&S, O) -> bool> {
inner: Arc<Mutex<HangingG... | the_stack |
// TODO: get rid of this when splitting dumbo into public and internal parts.
#![allow(missing_docs)]
use std::convert::From;
use std::net::Ipv4Addr;
use std::num::NonZeroUsize;
use std::result::Result;
use dumbo::pdu::arp::{
test_speculative_tpa, Error as ArpFrameError, EthIPv4ArpFrame, ETH_IPV4_FRAME_LEN,
};
us... | the_stack |
use std::{collections::HashMap, convert::TryFrom, fmt::Debug, fs::File, io::Read, net::SocketAddr, ops::Range, str::FromStr, time::Duration};
use clap::{app_from_crate, crate_authors, crate_description, crate_name, crate_version, value_t, Arg, SubCommand};
use toml;
use serde_derive::{Deserialize, Serialize};
use by... | the_stack |
use log::{info, debug};
use std::collections::HashMap;
use std::ffi::CString;
use std::os::raw::{c_char};
// use serde::de;
mod filter;
/// Low-level Proxy-WASM APIs for the host functions.
mod host;
// pub mod filter;
/// Logger that integrates with host's logging system.
pub struct Logger;
static LOGGER: Logger =... | the_stack |
use anyhow::{ensure, Context, Error};
use clap::{crate_version, App, Arg};
use diff::Result as DiffResult;
use grep::regex::{RegexMatcher, RegexMatcherBuilder};
use grep::searcher::{BinaryDetection, Searcher, SearcherBuilder, Sink, SinkMatch};
use ignore::overrides::OverrideBuilder;
use ignore::{WalkBuilder, WalkState}... | the_stack |
use super::lexer::{Error, Lexer, Result};
use super::retrieve_ident;
use super::types::{CompoundType, CompoundTypes, Sign, StorageClass, Type};
use super::{ast, ast::AST};
use super::{
token,
token::{Keyword, Symbol},
};
use rustc_hash::FxHashMap;
use std::collections::hash_map;
use std::collections::VecDeque;
... | the_stack |
//! Tests for the `splinter circuit show` subcommand.
use std::collections::BTreeMap;
use serial_test::serial;
use crate::CliError;
use super::{
get_circuit_id_from_propose_output, get_key, run_with_captured_output,
wait_until_circuits_created, wait_until_proposals_committed, Circuit,
};
/// Test that a ba... | the_stack |
// This module is largely copied from the rust-crypto ripemd.rs file;
// while rust-crypto is licensed under Apache, that file specifically
// was written entirely by Andrew Poelstra, who is re-licensing its
// contents here as CC0.
//! # SHA512
use core::{cmp, hash, str};
use HashEngine as EngineTrait;
use Hash as ... | the_stack |
use drm::control::{connector, crtc, encoder, framebuffer, Device as ControlDevice, Mode, PageFlipFlags};
use std::collections::HashSet;
use std::os::unix::io::AsRawFd;
use std::sync::{
atomic::{AtomicBool, Ordering},
Arc, RwLock,
};
use crate::backend::drm::{
device::legacy::set_connector_state,
devic... | the_stack |
//! UTF-8, the universal encoding.
use std::{str, mem};
use std::convert::Into;
use types::*;
/**
* UTF-8 (UCS Transformation Format, 8-bit).
*
* This is a Unicode encoding compatible to ASCII (ISO/IEC 646:US)
* and able to represent all Unicode codepoints uniquely and unambiguously.
* It has a variable-length d... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceOutput {}
impl std::fmt::Debug for UntagResourceOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struc... | the_stack |
use std::{
collections::HashMap,
fs::File,
io::prelude::*,
time::{SystemTime, UNIX_EPOCH},
};
use grid_sdk::{
client::location::{Location, LocationClient},
client::schema::{DataType, PropertyDefinition, SchemaClient},
location::addressing::GRID_LOCATION_NAMESPACE,
pike::addressing::GRID... | the_stack |
use io_context::Context;
use serde_json;
use std::{collections::HashSet, fs::File, io::BufReader, iter, iter::FromIterator, path::Path};
use crate::{
common::crypto::hash::Hash,
storage::mkvs::{
cache::*,
interop::{Driver, ProtocolServer},
sync::*,
tests,
tree::*,
... | the_stack |
use crate::{
command::control_protocol_events::AeronCommand,
concurrent::{
atomic_buffer::AtomicBuffer,
atomics,
broadcast::{broadcast_buffer_descriptor, record_descriptor, BroadcastTransmitError},
},
utils::{bit_utils::align, types::Index},
};
#[derive(Debug)]
pub struct Broadc... | the_stack |
use super::load_static;
use crate::prelude::*;
use crate::rt::channel::{unbounded, Receiver as ReceiverT, Sender as SenderT};
use crate::rt::sync::RwLock;
use anyhow::Result;
use std::collections::HashMap;
use std::sync::atomic::{fence, AtomicUsize, Ordering};
use std::sync::Arc;
#[derive(Clone)]
struct SharedConns {
... | the_stack |
//! This is the actual compression algorithm.
//!
//! The algorithm attempts to make a tree of deltas for the state group maps.
//! This is done by having multiple "levels", where each level has a maximum
//! size. The state groups are iterated over, with deltas being calculated
//! against the smallest level that isn'... | the_stack |
use std::borrow::Cow::{self, Borrowed, Owned};
use std::cmp::max;
use std::f64;
use std::fmt;
use std::iter::repeat;
use std::str::CharIndices;
use num::ToPrimitive;
use crate::exec::ExecError;
use crate::integer::Integer;
use crate::lexer::{BytePos, Span};
use crate::name::{debug_names, display_names, NameStore};
us... | the_stack |
// We use pointer tagging on the bottom two bits:
// 00 => this Value pointer is actually a FrozenValue pointer
// 01 => this is a real Value pointer
// 11 => this is a bool (next bit: 1 => true, 0 => false)
// 10 => this is a None
//
// We don't use pointer tagging for Int (although we'd like to), because
// our val_r... | the_stack |
use byteorder::{ByteOrder, NetworkEndian};
use core::fmt;
enum_with_unknown! {
pub enum TftpOpcode(u16) {
Read = 0x1,
Write = 0x2,
Data = 0x3,
Ack = 0x4,
Error = 0x5,
OptionAck = 0x6,
}
}
enum_with_unknown! {
pub enum TransferType(&'static str) {
Oct... | the_stack |
use alloc::{string::String, sync::Arc};
use crate::{idl::{JS_AST, JS_Schema}, json_flex::JSMAP, schema::{NP_Bytes_Data, NP_Parsed_Schema, NP_Value_Kind}};
use crate::error::NP_Error;
use crate::{schema::{NP_TypeKeys}, pointer::NP_Value, json_flex::NP_JSON};
use alloc::vec::Vec;
use alloc::boxed::Box;
use alloc::{borro... | the_stack |
use crate::{
connection::{self, open_token},
contexts::OnTransmitError,
sync::{IncrementalValueSync, PeriodicSync, ValueToFrameWriter},
transmission,
transmission::{interest::Provider, WriteContext},
};
use core::{
task::{Context, Poll, Waker},
time::Duration,
};
use s2n_quic_core::{
ack... | the_stack |
use std::ffi::CString;
use byteorder::{ByteOrder, LittleEndian};
use chrono::prelude::*;
use dcap_ql::quote::{self, Quote3SignatureVerify};
use mbedtls::{
alloc::{Box as MbedtlsBox, List as MbedtlsList},
x509::certificate::Certificate,
};
use rustc_hex::FromHex;
use serde_json::value::RawValue;
use sgx_isa::{A... | the_stack |
use counters::flavors::{Counter, CounterType};
use counters::Counters;
use crossbeam_queue::ArrayQueue;
use log::Logger;
use packet::BoxPkt;
use packet::PacketPool;
use perf::Perf;
use std::collections::HashMap;
use std::collections::VecDeque;
use std::sync::Arc;
// We preallocate space for these many graph nodes, of ... | the_stack |
use std::convert::{TryFrom, TryInto};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use crate::serialization::{
SerializationError, ZcashDeserialize, ZcashDeserializeInto, ZcashSerialize,
MAX_PROTOCOL_MESSAGE_LEN,
};
#[cfg(any(test, feature = "proptest-impl"))]
use proptest_derive::Arbitrary;
... | the_stack |
mod reader_test;
#[path = "./job_reader.rs"]
mod job_reader;
#[path = "./fleet_reader.rs"]
mod fleet_reader;
#[path = "./objective_reader.rs"]
mod objective_reader;
#[path = "./clustering_reader.rs"]
mod clustering_reader;
use self::clustering_reader::create_cluster_config;
use self::fleet_reader::{create_transpor... | the_stack |
use smallvec::SmallVec;
/// Special handling for nodes that were deleted by macro expansion. This is mostly for `#[cfg]`
/// and `#[test]` attrs. We collect info on deleted nodes right after expansion, then use that
/// info later to re-insert those nodes during macro collapsing.
use std::collections::{HashMap, HashS... | the_stack |
///! This module defines some core types that support find expressions: sources,
///! variables, expressions, etc.
///! These are produced as 'fuel' by the query parser, consumed by the query
///! translator and executor.
///!
///! Many of these types are defined as simple structs that are little more than
///! a riche... | the_stack |
use std::collections::{HashMap, BTreeMap};
use std::fs::File;
use std::io;
// use std::io::Read;
use std::path::PathBuf;
use thiserror::Error;
use pdb::{FallibleIterator, Rva, SymbolData,PDB};
use crate::pe;
const SYMBOL_SERVER: &str = "http://msdl.microsoft.com/download/symbols";
type Symbols = Hash... | the_stack |
use alloc::vec::Vec;
use crate::{Point, PathBuilder, Rect, Transform};
use crate::scalar::SCALAR_MAX;
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug)]
pub enum PathVerb {
Move,
Line,
Quad,
Cubic,
Close,
}
/// A Bezier path.
///
/// Can be created via [`PathBuilder`].
/// Where [`P... | the_stack |
use failure::Fallible;
use nix::errno::Errno;
use nix::unistd;
use nix::sys::{self, signal};
use signal_hook;
use std::cmp;
use std::fs;
use std::io::{self, Read};
use std::os::unix::io as unix_io;
use std::path::{Path, PathBuf};
use std::process;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
use s... | the_stack |
use reqwest;
use super::{
configuration,
Error,
};
use crate::apis::ResponseContent;
/// struct for passing parameters to the method [`delete_acl_policy`]
#[derive(Clone, Debug, Default)]
pub struct DeleteAclPolicyParams {
/// The ACL policy name.
pub policy_name: String,
/// Filters results based... | the_stack |
use crate::app_entry::*;
use crate::error::*;
use crate::monitor::*;
use chrono::Utc;
use failure::format_err;
use fs_extra;
use log::*;
use nix::sys::signal;
use nix::unistd::Pid;
use std::ffi::OsStr;
use std::fs;
use std::io::Read;
use std::os::unix;
use std::path::{Path, PathBuf};
use std::process::Command;
use std:... | the_stack |
use shared::basetsd::SIZE_T;
use shared::minwindef::{BOOL, DWORD, LPLONG, LPVOID, PBOOL, ULONG};
use um::minwinbase::{
LPCRITICAL_SECTION, LPSECURITY_ATTRIBUTES, PCRITICAL_SECTION, PREASON_CONTEXT,
};
use um::winnt::{
BOOLEAN, HANDLE, LARGE_INTEGER, LONG, LPCSTR, LPCWSTR, PRTL_BARRIER, PRTL_RUN_ONCE,
PVOID,... | the_stack |
use std::str::from_utf8;
use anyhow::{bail, Result};
use async_trait::async_trait;
use chrono::{offset::Utc, DateTime, Duration};
use chrono_humanize::HumanTime;
use google_drive::traits::{DriveOps, FileOps, PermissionOps};
use inflector::cases::kebabcase::to_kebab_case;
use log::{info, warn};
use macros::db;
use reva... | the_stack |
use crate::{
CompiledRenderGraph, ExecutingRenderGraph, ExportedTemporalRenderGraphState,
PredefinedDescriptorSet, RenderGraphExecutionParams, TemporalRenderGraph,
TemporalRenderGraphState, TemporalResourceState,
};
use kajiya_backend::{
ash::vk,
dynamic_constants::*,
pipeline_cache::*,
rspi... | the_stack |
use super::*;
use std::hash::{Hash, Hasher};
// Hash just the bytes of the slice, without length prefix
struct Bytes<'a>(&'a [u8]);
impl<'a> Hash for Bytes<'a> {
#[allow(unused_must_use)]
fn hash<H: Hasher>(&self, state: &mut H) {
for byte in self.0 {
state.write_u8(*byte);
}
... | the_stack |
use safe_arith::{ArithError, SafeArith};
use std::collections::HashMap;
use types::{
consts::altair::{
NUM_FLAG_INDICES, TIMELY_HEAD_FLAG_INDEX, TIMELY_SOURCE_FLAG_INDEX,
TIMELY_TARGET_FLAG_INDEX,
},
BeaconState, BeaconStateError, ChainSpec, Epoch, EthSpec, ParticipationFlags, RelativeEpoch,... | the_stack |
use super::{UpdateAgent, UpdateAgentInfo, UpdateAgentMachineState, UpdateAgentState};
use crate::rpm_ostree::{self, Release};
use crate::utils;
use actix::prelude::*;
use anyhow::{bail, format_err, Error, Result};
use fn_error_context::context;
use futures::prelude::*;
use log::trace;
use prometheus::{IntCounter, IntCo... | the_stack |
// Baseview modifications to druid code:
// - collect functions from various files
// - update imports, paths etc
//! X11 keyboard handling
use xcb::xproto;
use keyboard_types::*;
use crate::keyboard::code_to_location;
/// Convert a hardware scan code to a key.
///
/// Note: this is a hardcoded layout. We need to ... | the_stack |
use proc_macro2::{Literal, Span, TokenStream};
use quote::quote;
use std::{
borrow::Cow,
collections::{HashMap, HashSet},
};
use syn::{
parse::Parser, punctuated::Punctuated, spanned::Spanned, Error, Expr, LitByteStr, Token,
};
type Result<T> = std::result::Result<T, Error>;
/// Macro like write!() but fo... | the_stack |
pub struct DescribeAccountLimitsPaginator<
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_account_limits_input::Builder,
}
impl<... | the_stack |
extern crate libc;
use std::str;
use std::string::String;
use json::*;
use smb::smb::*;
use smb::smb1::*;
use smb::smb2::*;
use smb::dcerpc::*;
use smb::funcs::*;
#[cfg(not(feature = "debug"))]
fn debug_add_progress(_js: &Json, _tx: &SMBTransaction) { }
#[cfg(feature = "debug")]
fn debug_add_progress(js: &Json, tx: ... | the_stack |
use crate::errors;
use crate::errors::Result;
use crate::models::theme::{TempThemes, Theme};
use log::{error, trace};
use std::ffi::OsStr;
use std::fs;
use std::fs::File;
use std::io::Write;
use std::path::{Path, PathBuf};
use xdg::BaseDirectories;
pub const THEMES_DIR: &str = "themes";
const BASE_DIR_PREFIX: &str = ... | the_stack |
use crate::config::CFG;
use crate::filename::disassemble;
use crate::settings::Hyperlink;
use lazy_static::lazy_static;
use sanitize_filename_reader_friendly::sanitize;
use std::collections::HashMap;
use std::hash::BuildHasher;
use std::ops::Deref;
use std::ops::DerefMut;
use std::path::Path;
use std::path::PathBuf;
us... | the_stack |
use crate::{
client::{Mailbox, SessionChannel},
constants::CLIENT_PIPE_CAPACITY,
data::{PtySize, Request, RequestData, ResponseData},
net::TransportError,
};
use derive_more::{Display, Error, From};
use log::*;
use std::sync::Arc;
use tokio::{
io,
sync::{
mpsc::{
self,
... | the_stack |
use byteorder::{BigEndian, ByteOrder};
use enum_primitive_derive::Primitive;
use flate2::{read::GzDecoder, write::GzEncoder, Compression};
use num_traits::{FromPrimitive, ToPrimitive};
use strum_macros::{Display, EnumIter, EnumString};
use std::{
cell::RefCell,
collections::hash_map::HashMap,
io::{Read, Wr... | the_stack |
use crate::event::{rewrite_events, RewriteParseEvents};
use crate::parser::{expected_any, ParsedSyntax, ToDiagnostic};
use crate::syntax::class::parse_initializer_clause;
use crate::syntax::expr::{
is_at_identifier_name, parse_conditional_expr, parse_expression, parse_name, parse_unary_expr,
};
use crate::syntax::js_p... | the_stack |
mod action;
mod activity;
mod base64_interface;
mod hex_interface;
mod json_interface;
mod json_lib_utils;
mod browser;
pub mod calltype;
mod context;
mod debot_abi;
mod dengine;
mod dinterface;
mod errors;
mod helpers;
mod info;
mod msg_interface;
mod network_interface;
mod query_interface;
mod routines;
mod run_outpu... | the_stack |
use std::cmp::Ordering;
/// Sorts the array with either quick sort or insertion sort, depending on the
/// array's size.
fn hybrid_sort<T, F>(arr: &mut [T], compare: &mut F)
where F: FnMut(&T, &T) -> Ordering,
{
if arr.len() <= 32 {
insertion_sort(arr, compare);
} else {
quick_sort(arr, com... | the_stack |
use crate::{
ast::Ast,
core_forms, eval_unseemly_program_top, expand, grammar,
name::{n, Name},
runtime::{core_values, eval, eval::Value},
ty, type_unseemly_program_top,
util::assoc::Assoc,
};
use std::cell::RefCell;
// HACK: the non-test code in here is copied from `cli.rs`.
thread_local! {
... | the_stack |
use crate::base::iana::{Rtype, SvcbParamKey};
use crate::base::name::{ParsedDname, ToDname};
use crate::base::octets::{
Compose, Octets512, OctetsBuilder, OctetsFrom, OctetsRef, Parse,
ParseError, Parser, ShortBuf,
};
use crate::base::rdata::RtypeRecordData;
use core::{fmt, hash};
use param::{AllParams, SvcbPar... | the_stack |
use std::collections::BTreeSet;
use std::convert::TryInto;
use anyhow::{format_err, Result};
use iced_x86::{Decoder, DecoderOptions, Instruction, Mnemonic, OpKind, Register};
/// Size of padding inserted (on Window) between `__start_` delimiter symbols
/// and the first entry of the delimited table's array.
///
/// T... | the_stack |
use std::sync::{Arc, Mutex};
use kvm_ioctls::DeviceFd;
use super::{
state::{GICv3ItsState, GICv3State},
GICConfig, GICDevice, UtilResult,
};
use crate::interrupt_controller::errors::{ErrorKind, Result, ResultExt};
use hypervisor::KVM_FDS;
use machine_manager::machine::{KvmVmState, MachineLifecycle};
use migra... | the_stack |
use std::fmt::Debug;
use serde::{de::DeserializeOwned, Serialize};
use transmog::{Format, OwnedDeserializer};
use transmog_pot::Pot;
use crate::{
document::Document,
schema::{
view::map::{MappedValue, Mappings},
Collection, CollectionDocument, CollectionName, InvalidNameError, Name,
Se... | the_stack |
use super::context::*;
use super::environment::*;
use super::visitor::*;
use super::AST::*;
use std::env::var;
pub struct SemanticAnalysis {}
impl Visitor for SemanticAnalysis {
fn start_contract_declaration(
&mut self,
_t: &mut ContractDeclaration,
_ctx: &mut Context,
) -> VResult {
... | the_stack |
use crate::core::instruction::{
BfcParams, BfiParams, CondBranchParams, Imm32Carry, MovtParams, ParamsRegImm32,
Reg2DoubleParams, Reg2FullParams, Reg2ImmCarryParams, Reg2ImmParams, Reg2Params,
Reg2RdRmParams, Reg2RnRmParams, Reg2RtRnImm32Params, Reg2ShiftNParams,
Reg2ShiftNoSetFlagsParams, Reg2ShiftPara... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.