text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use crate::msr::*;
use crate::vmx::vmread;
use crate::vmregs::VmRegs;
use crate::num::FromPrimitive;
pub mod descriptor_table;
pub use descriptor_table::*;
#[derive(Debug, Eq, PartialEq, Hash, Copy, Clone)]
#[repr(u8)]
pub enum VmExitReason {
Exception(ExceptionVector) = 0,
ExternalInterrupt = 1,
TripleF... | the_stack |
use crate::BSVErrors;
use crate::ECDSA;
use std::convert::TryFrom;
use std::io::Write;
use crate::{transaction::*, Hash, PrivateKey, PublicKey, Script, Signature};
use byteorder::{LittleEndian, WriteBytesExt};
use num_traits::{FromPrimitive, ToPrimitive};
use strum_macros::EnumString;
#[cfg(target_arch = "wasm32")]
us... | the_stack |
use crate as hlist;
use nalgebra::base::dimension::*;
// ====================
// === HasTupleRepr ===
// ====================
/// All types which have a tuple representation.
#[allow(missing_docs)]
pub trait HasTupleRepr {
type TupleRepr;
}
/// Tuple representation of a type.
pub type TupleRepr<T> = <T as HasT... | the_stack |
pub type c_schar = i8;
pub type c_uchar = u8;
pub type c_short = i16;
pub type c_ushort = u16;
pub type c_int = i32;
pub type c_uint = u32;
pub type c_float = f32;
pub type c_double = f64;
pub type c_longlong = i64;
pub type c_ulonglong = u64;
pub type intmax_t = i64;
pub type uintmax_t = u64;
pub type uintptr_t = usi... | 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 super::abloom;
use super::address::*;
use super::index;
use super::oplog;
use super::repository;
use super::xid::*;
use serde::{Deserialize, Serialize};
use std::convert::TryInto;
use thiserror::Error;
pub const CURRENT_REPOSITORY_PROTOCOL_VERSION: &str = "11";
pub const DEFAULT_MAX_PACKET_SIZE: usize = 1024 * 102... | the_stack |
use core::fmt::Debug;
use core::iter::FromIterator;
use std::collections::{BTreeMap, BTreeSet, HashSet};
use super::node_dispatch::SmallNode;
use super::tree::{Idx, SgTree};
use super::SgError;
use rand::rngs::SmallRng;
use rand::{Rng, SeedableRng};
use tinyvec::array_vec;
const CAPACITY: usize = 1024;
// Test Help... | the_stack |
use std::{fs::File, io::BufReader, path::PathBuf};
use crate::{
noise::{handshake_init_msg_len, handshake_resp_msg_len, NoiseConfig, MAX_SIZE_NOISE_MSG},
test_utils::TEST_SEED,
x25519, Uniform as _,
};
use rand::SeedableRng;
use serde::*;
#[test]
fn simple_handshake() {
// setup peers
let mut rng... | the_stack |
use crate::buildmanager::*;
use crate::fileeditor::*;
use crate::filepanel::*;
use crate::filetree::*;
use crate::homepage::*;
use crate::itemdisplay::*;
use crate::keyboard::*;
use crate::loglist::*;
use crate::makepadstorage::*;
use crate::searchresults::*;
use crate::worldview::WorldView;
use std::collections::HashM... | the_stack |
use crate::process::ThreadStruct;
use alloc::sync::Arc;
use core::mem::size_of;
use crate::i386::gdt::{GDT, MAIN_TASK};
use crate::i386::gdt::GdtIndex;
/// The hardware context of a paused thread. It contains just enough registers to get the thread
/// running again.
///
/// All other registers are to be saved on the ... | the_stack |
use std::cmp::{min, max};
use std::collections::{HashMap, HashSet};
use std::fmt;
use std::net::SocketAddr;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, RwLock};
use std::time::Instant;
use abstract_ns::Name;
use proto::{ReceivedImage, AbortedImage};
use cluster::addr::AddrCell;
use cluster::fu... | the_stack |
use std::ops::Range;
use std::str::FromStr;
use libeir_diagnostics::{ByteOffset, SourceIndex, SourceSpan};
use libeir_util_number::{Float, FloatError, Integer, ToPrimitive};
use libeir_util_parse::{Scanner, Source};
use crate::util::escape_stm::{EscapeStm, EscapeStmAction};
use super::errors::LexicalError;
use supe... | the_stack |
use std::{
error,
fmt::{self, Display},
result,
time::{Duration, SystemTime},
};
#[cfg(all(feature = "serde_with", feature = "chrono-0_4"))]
use serde::{Deserialize, Deserializer, Serialize};
#[cfg(all(feature = "serde_with", feature = "chrono-0_4"))]
use serde_with::{DeserializeAs, SerializeAs};
use ... | the_stack |
use std::{iter::FromIterator, sync::Arc, time::Duration};
use futures::executor::block_on;
use kvproto::{metapb, pdpb};
use pd_client::PdClient;
use raftstore::store::util::find_peer;
use test_raftstore::*;
use tikv_util::{config::ReadableDuration, mpsc};
#[test]
fn test_unsafe_recovery_send_report() {
let mut cl... | the_stack |
use std::cell::RefCell;
use std::fmt;
use std::process::Command;
use std::time::Duration;
use chrono::{DateTime, SecondsFormat, Utc};
use core::fmt::Write;
use r2d2_redis::RedisConnectionManager;
use serde_json::json;
use slog::Key;
use slog::{OwnedKVList, Record, KV};
/// A logger that sends JSON formatted logs to a... | the_stack |
use crate::sd::CodeSerde;
use crate::trans::SignatureTypeTranslator;
use crate::trans::{AccessFlagHelper, AccessFlagsTranslator, CodeTranslator};
use class_parser::MethodSignature;
use classfile::attributes::LocalVariable;
use classfile::{
attributes::LineNumber, attributes::StackMapFrame, attributes::VerificationT... | the_stack |
use std::sync::Arc;
use arrow_format::ipc;
use arrow_format::ipc::flatbuffers::FlatBufferBuilder;
use arrow_format::ipc::Message::CompressionType;
use crate::array::*;
use crate::columns::Columns;
use crate::datatypes::*;
use crate::error::{ArrowError, Result};
use crate::io::ipc::endianess::is_native_little_endian;
... | the_stack |
use std::io;
use std::net;
use std::borrow::{Borrow, BorrowMut};
use std::cell::Cell;
use std::error::Error;
use std::time::{Duration, Instant};
use std::collections::HashMap;
use std::fmt::Write;
use std::str::FromStr;
use std::path::Path;
use std::os::raw::c_int;
use std::os::unix;
use std::os::unix::io::{RawFd, From... | the_stack |
pub const FRAME_BUFFER_WIDTH: u16 = 320;
pub const FRAME_BUFFER_HEIGHT: u16 = 200;
pub const INACTIVE_THREAD: u16 = 0xffff;
pub const INVALID_PALETTE: u8 = 0xff;
pub const NUM_REGISTERS: usize = 256;
pub const NUM_THREADS: usize = 64;
pub const NUM_COLORS_PALETTE: u8 = 16;
pub const BASE_PART_ID: u16 = 0x3e80;
// thes... | the_stack |
use std::sync::{mpsc, Arc, Mutex};
use std::{convert, net, thread};
use serde::{Deserialize, Deserializer};
use tokio::sync::{mpsc as tmpsc, oneshot};
use tokio_stream::{wrappers::UnboundedReceiverStream, Stream, StreamExt};
use warp::http::{header, StatusCode};
use warp::{self, reply, sse::Event, Filter, Reply};
use... | the_stack |
use crate::native;
use crate::native::JNINativeMethodStruct;
use crate::oop::{self, Oop, ValueType};
use crate::runtime::local::Local;
use crate::runtime::{self, exception, frame::Frame, thread, DataArea, Interp};
use crate::types::{ClassRef, FrameRef, JavaThreadRef, MethodIdRef};
use crate::util;
use class_parser::Met... | the_stack |
/// Delivery Prototype
///
/// This module is responsible for handling the .delivery/project.toml file
/// that is currently a prototype for local phases execution. This file can
/// be configurable and it doesn't conflict with the existing config.json
use errors::{DeliveryError, Kind};
use hyper::Client as HyperClient... | the_stack |
use crate::error::Error;
use crate::parse_utils::{
consume_attributes, consume_comma, consume_stuff_until, consume_vis_marker, parse_ident,
};
use crate::punctuated::Punctuated;
use crate::types::{
EnumVariant, EnumVariantValue, GenericBound, GenericParam, GenericParamList, NamedField,
NamedStructFields, St... | the_stack |
use super::{Guid, Status, CStr16Ptr, Void};
use super::CStr16;
use super::{PhysicalAddress};
use core::mem;
/// UEFI-defined runtime services structure
///
/// Contains the raw function pointers to the services, use the `make_handle_*` functions to get safe/rustic interfaces to these functions
#[repr(C)]
pub struct Ru... | the_stack |
use crate::layers::ServiceBuilderExt;
use crate::plugin::Handler;
use crate::plugin::Plugin;
use crate::plugins::telemetry::config::{MetricsCommon, Trace};
use crate::plugins::telemetry::metrics::apollo::studio::{
SingleContextualizedStats, SingleQueryLatencyStats, SingleReport, SingleTracesAndStats,
};
use crate::... | the_stack |
use super::TcpSocketResponse;
use crate::net::tcp::TlsOptions;
use crate::net::ConnectionId;
use bytes::{Bytes, BytesMut};
use futures::future::FutureExt;
use std::collections::VecDeque;
use std::net::SocketAddr;
use std::sync::Arc;
use tokio::io::{AsyncReadExt, AsyncWriteExt, ReadHalf, WriteHalf};
use tokio::net::{Tcp... | the_stack |
use crate::config::config::Config;
use crate::ingester::manager::Manager;
use crate::iterator::merge_iterator::MergeIteartor;
use crate::json_parser::parser::get_value_from_json;
use crate::parser::parser;
use crate::partition::partition_iterator::PartitionIterator;
use crate::partition::segment_iterator::Entry;
use cr... | the_stack |
use bincode;
use bytes::Bytes;
use command::CommandError;
use cubes::*;
use database::*;
use fabric::*;
use hash::hash_slot;
use inflightmap::InFlightMap;
use rand::{thread_rng, Rng};
use std::collections::hash_map::Entry as HMEntry;
use std::time::{Duration, Instant};
use storage::*;
use utils::{join_u64, split_u64};
... | the_stack |
#[cfg(not(feature = "std"))]
mod std {
pub use core::*;
}
use std::any::Any as StdAny;
use std::any::TypeId;
#[cfg(feature = "nightly")]
use std::convert::TryFrom;
#[cfg(feature = "std")]
use std::error::Error;
#[cfg(feature = "nightly")]
use std::intrinsics;
use std::fmt::{self, Debug, Display};
use std::mem;
//... | the_stack |
use crate::{
frame::{FitError, Tag},
varint::VarInt,
};
use core::{convert::TryFrom, mem::size_of};
use s2n_codec::{
decoder_parameterized_value, DecoderBuffer, DecoderBufferMut, Encoder, EncoderValue,
};
//= https://www.rfc-editor.org/rfc/rfc9000#section-19.8
//# STREAM frames implicitly create a stream a... | the_stack |
use crate::*;
use core::sync::atomic::{AtomicU64, Ordering};
/// A trait defining bitfield operations we need for tracking allocated objects within a page.
pub(crate) trait Bitfield {
fn initialize(&mut self, for_size: usize, capacity: usize);
fn first_fit(
&self,
base_addr: usize,
layo... | the_stack |
use IdGenerator;
use errors::KernelError;
use failure::Fallible;
use fuse;
use nix;
use nix::errno::Errno;
use nix::{sys, unistd};
use std::ffi::OsStr;
use std::fs;
use std::path::{Component, Path, PathBuf};
use std::result::Result;
use std::sync::Arc;
mod caches;
pub use self::caches::{NoCache, PathCache};
pub mod co... | the_stack |
use std::iter::FromIterator;
use std::mem::take;
use content_tree::*;
use rle::{HasLength, MergableSpan, SplitableSpan};
use smartstring::alias::{String as SmartString};
use crate::list::time::positionmap::MapTag::*;
use std::pin::Pin;
use crate::list::{DoubleDeleteList, ListCRDT, Time, RangeTree, ROOT_TIME};
use crat... | the_stack |
use tensor::*;
use num::NumCast;
macro_rules! impl_tk_dispatch_self_ref {
($key:ident, $var:ident, $action:expr ) => {(
match * $key {
TensorKind::FloatTensor(ref $var) => TensorKind::FloatTensor($action) ,
TensorKind::LongTensor(ref $var) => TensorKind::LongTensor($action) ,
... | the_stack |
mod postgis_postgres {
use geozero::wkb;
use geozero::wkt::WktWriter;
use postgres::{Client, NoTls};
#[test]
#[ignore]
fn blob_query() -> Result<(), postgres::error::Error> {
use geozero::ToWkt;
let mut client = Client::connect(&std::env::var("DATABASE_URL").unwrap(), NoTls)?;
... | the_stack |
use std::fmt::Display;
use std::sync::Arc;
use anyerror::AnyError;
use common_datavalues::chrono::DateTime;
use common_datavalues::chrono::Utc;
use common_meta_types::txn_condition;
use common_meta_types::txn_op::Request;
use common_meta_types::AppError;
use common_meta_types::ConditionResult;
use common_meta_types::C... | the_stack |
//! Cloud-based implementation of the EndBASIC service client.
use crate::service::*;
use async_trait::async_trait;
use bytes::Buf;
use reqwest::header::HeaderMap;
use reqwest::Response;
use reqwest::StatusCode;
use std::collections::HashMap;
use std::io;
use std::str;
/// Base address of the REST API.
const API_ADDR... | the_stack |
use std::{
collections::HashMap,
ops::{Deref, DerefMut},
sync::{mpsc::Sender, Arc, Mutex, MutexGuard},
};
use tune::{
key::PianoKey,
midi::ChannelMessageType,
pitch::{Pitch, Ratio},
scala::{Kbm, KbmRoot, Scl},
tuning::Tuning,
};
use crate::model::{Event, Location, SourceId};
pub struc... | the_stack |
use crate::filters::{Filter, NoopFilter};
use crate::sort::{sort_urls, SortConfig};
use crate::storage::FileStorage;
use crate::types::URLRecord;
use crate::util::create_temp_file;
use crate::{Importer, Registry, RegistryReader, Repository};
use std::error::Error;
use std::path::PathBuf;
// TODO: consider introducing ... | the_stack |
use alloc::collections::BTreeMap;
use core::fmt;
use super::{error, lir::Program};
use lalrpop_util::lalrpop_mod;
lalrpop_mod!(pub mir_parser);
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Address(pub u32);
impl fmt::Display for Address {
fn fmt(&self, f: &mut fmt::Formatter) -... | the_stack |
use crate::access::ckpt::PendingFileOps;
use crate::access::wal::{self, Lsn, RmgrId};
use crate::access::xact::SessionExt as xactSessionExt;
use crate::utils::marc::{Destory, Marc};
use crate::utils::sb::{self, SharedBuffer};
use crate::utils::{persist, ser, SessionState};
use crate::{FileId, Oid};
use anyhow::ensure;
... | the_stack |
//****************************************************************************
// Automatically generated from yaml/swiftnav/sbp/solution_meta.yaml
// with generate.py. Please do not hand edit!
//****************************************************************************/
//! Standardized Metadata messages for Fuzed S... | the_stack |
//! Changing function definitions at runtime.
//!
//! This crate is primarily used to load new function definitions from shared
//! object files in an exceedingly easy way.
//!
//! ## Short Example
//! The following shows how
//! dead-simple this crate is to use:
//! ```
//! // main.rs
//! use hotpatch::*;
//!
//! #[pa... | the_stack |
use std::io;
use std::u32;
use std::fs::File;
use utility::{ErrorKind, ReadStream, many_metadata};
use metadata::{
Metadata, Data,
StreamInfo, CueSheet, VorbisComment, Picture,
PictureType,
};
// Will return true when the unwrapped value of `option` and `other` match
// or `option` is `Option::None`, otherwise... | the_stack |
use crate::packet::CompressedLossList;
use crate::protocol::encryption::Cipher;
use crate::protocol::sender::encapsulate::Encapsulate;
use crate::{ConnectionSettings, DataPacket, SeqNumber};
use bytes::Bytes;
use std::cmp::max;
use std::collections::{BTreeSet, VecDeque};
use std::time::{Duration, Instant};
#[derive(De... | the_stack |
use static_map;
use font_types::{GlyphVariants, GlyphPart, ConstructableGlyph, ReplacementGlyph};
pub static VERT_VARIANTS: static_map::Map<u32, GlyphVariants> = static_map! {
Default: GlyphVariants { constructable: None, replacements: &[] },
0x28 => GlyphVariants { // parenleft
constructable: Some(Con... | the_stack |
use std::convert::TryFrom;
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
use std::os::unix::prelude::ExitStatusExt;
use std::path::{Path, PathBuf};
use std::process::ExitStatus;
use std::sync::Arc;
use async_trait::async_trait;
use log::{debug, error};
use nix::sys::signal::kill;
use nix::unistd::Pid;
use oci_sp... | the_stack |
use std::cell::{Cell, RefCell};
use std::collections::{vec_deque::Iter, HashMap, HashSet, VecDeque};
use std::rc::Rc;
use crate::script::{CallbackData, FuncKind, TriggeredCallback};
use crate::{AreaState, ChangeListener, ChangeListenerList, Effect, EntityState, GameState};
use sulis_core::{config::Config, util::{gen_r... | the_stack |
use crate::{
compile::{
engine::provider::CubeContext,
rewrite::{
agg_fun_expr, aggr_aggr_expr, aggr_aggr_expr_empty_tail, aggr_group_expr,
aggr_group_expr_empty_tail, aggregate, alias_expr, analysis::LogicalPlanAnalysis,
cast_expr, column_expr, cube_scan, fun_exp... | the_stack |
use plank_syntax::ast::{
BinaryOp, CallParam, Expr, Field, FnParam, Function, FunctionType, Ident, Literal, Mutability,
Program, Signedness, Size, Statement, Struct, Type, UnaryOp,
};
#[derive(Copy, Clone)]
enum ListFormat {
Singleline,
Multiline(u32),
}
struct LispFormatter {
output: String,
... | the_stack |
pub use crate::{common::genesis_deposits, interop::interop_genesis_state};
pub use eth1::Config as Eth1Config;
use eth1::{DepositLog, Eth1Block, Service as Eth1Service};
use slog::{debug, error, info, trace, Logger};
use state_processing::{
eth2_genesis_time, initialize_beacon_state_from_eth1, is_valid_genesis_sta... | the_stack |
use crate::python_bindings::{v2_7_15, v3_3_7, v3_5_5, v3_6_6, v3_7_0, v3_8_0, v3_9_5, v3_10_0};
use std;
pub trait InterpreterState {
type ThreadState: ThreadState;
type Object: Object;
type StringObject: StringObject;
type ListObject: ListObject;
type TupleObject: TupleObject;
fn head(&self) ... | the_stack |
use crate::world::World;
use anyhow::Result;
use log::info;
use nalgebra::Vector3;
use std::collections::HashMap;
use std::sync::Arc;
use std::time::Instant;
use voxel_rs_common::block::BlockId;
use voxel_rs_common::physics::aabb::AABB;
use voxel_rs_common::physics::player::PhysicsPlayer;
use voxel_rs_common::{
dat... | the_stack |
use super::Command as C;
use arrayvec::ArrayVec;
use glow::HasContext;
use std::{mem, slice, sync::Arc};
#[cfg(not(target_arch = "wasm32"))]
const DEBUG_ID: u32 = 0;
const CUBEMAP_FACES: [u32; 6] = [
glow::TEXTURE_CUBE_MAP_POSITIVE_X,
glow::TEXTURE_CUBE_MAP_NEGATIVE_X,
glow::TEXTURE_CUBE_MAP_POSITIVE_Y,
... | the_stack |
use crate::sealed::sorted_linked_list::Kind as LLKind;
use core::fmt;
use core::marker::PhantomData;
use core::mem::MaybeUninit;
use core::ops::{Deref, DerefMut};
use core::ptr;
/// Trait for defining an index for the linked list, never implemented by users.
pub trait SortedLinkedListIndex: Copy {
#[doc(hidden)]
... | the_stack |
use crate::common::{Label, LabelId};
use crate::error::{GDBError, GDBResult};
use crate::graph_db_impl::{IndexData, LargeGraphDB, MutableGraphDB};
use crate::io::import;
use crate::schema::LDBCGraphSchema;
use crate::table::PropertyTableTrait;
use petgraph::graph::{DiGraph, IndexType};
use serde::de::DeserializeOwned;
... | the_stack |
use crate::math::RoundingMode;
use crate::error::{Error, Result, UnitResult, u64_to_usize, u32_to_usize};
use crate::io::Data;
use std::{
cmp::Ordering,
collections::BinaryHeap,
io::{Cursor, Read, Write},
};
use std::convert::TryFrom;
use smallvec::SmallVec;
pub fn decompress(compressed: &[u8], expected_s... | the_stack |
// spell-checker:ignore (ToDO) abcdefghijklmnopqrstuvwxyz efghijklmnopqrstuvwxyz vwxyz emptyfile
extern crate tail;
use crate::common::util::*;
use std::char::from_digit;
use std::io::Write;
static FOOBAR_TXT: &str = "foobar.txt";
static FOOBAR_2_TXT: &str = "foobar2.txt";
static FOOBAR_WITH_NULL_TXT: &str = "foobar... | the_stack |
use {
anyhow::{Context, Error},
fidl::endpoints::{create_proxy, ClientEnd},
fidl::HandleBased,
fidl_fuchsia_component_runner::{
ComponentControllerEventStream, ComponentControllerMarker, ComponentRunnerMarker,
ComponentRunnerProxy, ComponentStartInfo,
},
fidl_fuchsia_data as fdat... | the_stack |
use dotenv::dotenv;
use rust_decimal::prelude::Decimal;
use std::env;
use openlimits::{
exchange::coinbase::{
model::{CancelAfter, GetFillsReq, GetOrderRequest, OrderTimeInForce},
Coinbase, CoinbaseCredentials, CoinbaseParameters,
},
prelude::*,
};
#[tokio::test]
async fn get_account() {
... | the_stack |
use proc_macro2::{Delimiter, Ident, LexError, Literal, Spacing, Span, TokenStream, TokenTree};
use proc_quote::ToTokens;
use std::fmt;
use std::io::Write;
use std::mem;
use std::ops::{Add, AddAssign};
use std::process::{Command, Stdio};
use std::str::FromStr;
/// Abstracted representation of (generated) "source code",... | the_stack |
use hashbrown::hash_map::RawEntryMut;
use hashbrown::HashMap;
use std::borrow::Borrow;
use std::collections::hash_map::RandomState;
use std::fmt;
use std::future::Future;
use std::hash::{BuildHasher, Hash, Hasher};
use tokio::runtime::Handle;
use tokio::task::{AbortHandle, Id, JoinError, JoinSet, LocalSet};
/// A coll... | the_stack |
extern crate event;
extern crate libc;
extern crate orbclient;
extern crate orbimage;
extern crate syscall;
pub mod rect;
pub mod image;
use event::EventQueue;
use image::{ImageRef};
use orbclient::{Color, Event, Renderer};
use rect::Rect;
use std::{
cell::RefCell,
env,
fs::File,
io::{self, ErrorKind,... | the_stack |
use crate::error::{FileIoAction, FileKind};
use crate::io::FileSystemReader;
use crate::project::Manifest;
use crate::{Error, Result};
use hexpm::version::{Range, Version};
use http::Uri;
use serde::Deserialize;
use std::collections::{HashMap, HashSet};
use std::path::{Path, PathBuf};
#[cfg(test)]
use crate::project::... | the_stack |
use chrono::offset::TimeZone;
use chrono::{DateTime, Datelike, Timelike, Utc};
use std::ops::Bound::{Included, Unbounded};
use std::fmt::{Display, Formatter, Result as FmtResult};
use crate::time_unit::*;
use crate::ordinal::*;
use crate::queries::*;
impl From<Schedule> for String {
fn from(schedule: Schedule) ->... | the_stack |
use crate::{
common::non_null_string::NonNullString,
seccomp::{profiles::default, Profile, SyscallArgRule, SyscallRule},
};
use bindings::{
seccomp_data, sock_filter, sock_fprog, BPF_ABS, BPF_ALU, BPF_AND, BPF_IMM, BPF_JEQ, BPF_JMP,
BPF_K, BPF_LD, BPF_MAXINSNS, BPF_MEM, BPF_NEG, BPF_OR, BPF_RET, BPF_ST,... | the_stack |
mod temporary_page;
mod mapper;
#[cfg(not(mapper_spillful))]
mod table;
#[cfg(mapper_spillful)]
pub mod table;
pub use page_table_entry::*;
pub use self::temporary_page::TemporaryPage;
pub use self::mapper::*;
use core::{
ops::{Deref, DerefMut},
fmt,
};
use super::*;
use kernel_config::memory::{RECURSIVE_P4... | the_stack |
use std::str;
use crate::binary::read::{ReadArray, ReadBinary, ReadCtxt};
use crate::binary::write::{WriteBinary, WriteContext};
use crate::binary::{I16Be, I32Be, U16Be, U32Be, U8};
use crate::error::{ParseError, WriteError};
pub struct PostTable<'a> {
pub header: Header,
pub opt_sub_table: Option<SubTable<'a... | the_stack |
use super::{
lock_media, read_raw_buf, read_raw_byte, verify_raw_buf, Error, MediaInfo, MediaType,
RawSaveAccess,
};
use crate::sync::{with_irqs_disabled, InitOnce, Static};
use core::cmp;
use voladdress::*;
// Volatile address ports for flash
const FLASH_PORT_BANK: VolAddress<u8, Safe, Safe> = unsafe { VolAddress... | the_stack |
use std::collections::HashMap;
use crate::errors::*;
// for readability's sake
pub type ParsedLine = Result<Option<(String, String)>>;
pub fn parse_line(
line: &str,
substitution_data: &mut HashMap<String, Option<String>>,
) -> ParsedLine {
let mut parser = LineParser::new(line, substitution_data);
p... | the_stack |
use na::RealField;
use petgraph::graph::{NodeIndex, UnGraph};
use petgraph::visit::EdgeRef;
use crate::pipeline::narrow_phase::{ContactAlgorithm, ProximityAlgorithm, ProximityDetector};
use crate::pipeline::object::CollisionObjectHandle;
use crate::query::{ContactManifold, Proximity};
use petgraph::prelude::EdgeIndex;... | the_stack |
#![no_std]
#![no_main]
#![feature(
asm,
thread_local,
alloc_error_handler,
panic_info_message,
lang_items,
core_intrinsics
)]
#![allow(unused_imports, dead_code)]
extern crate alloc;
extern crate spin;
extern crate vibrio;
extern crate x86;
#[macro_use]
extern crate lazy_static;
extern crate li... | the_stack |
pub struct GetOfferingStatusPaginator<
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::get_offering_status_input::Builder,
}
impl<C, M, R>... | the_stack |
use test_utils::TestEnvironment as TestEnv;
use test_utils::{set, AsPtr};
struct ConnectArguments {
fd: libc::c_int,
addr: Option<libc::sockaddr_in>, // if None, a null pointer should be used
addr_len: libc::socklen_t,
}
fn main() -> Result<(), String> {
// should we restrict the tests we run?
let... | the_stack |
pub struct DescribeAggregateComplianceByConfigRulesPaginator<
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_aggregate_compliance... | the_stack |
use super::pb;
use super::Error;
use alloc::string::String;
use alloc::vec::Vec;
use crate::workflow::confirm;
use pb::cardano_response::Response;
use pb::cardano_script_config::Config;
use pb::CardanoNetwork;
use bech32::{FromBase32, ToBase32, Variant};
use blake2::{
digest::{Update, VariableOutput},
VarB... | the_stack |
use std::{collections::HashSet, time::Duration};
use proptest::{
collection::{hash_set, vec},
prelude::*,
};
use tokio::time;
use zebra_chain::{parameters::Network, transaction::UnminedTxId};
use zebra_network as zn;
use zebra_state::ChainTipSender;
use zebra_test::mock_service::{MockService, PropTestAssertio... | the_stack |
extern crate serde;
extern crate serde_json;
use serde::{Deserialize, Serialize};
use super::{
errors::{ErrorKind, Result},
pci_args_check,
};
use crate::config::{CmdParser, ConfigCheck, ExBool, VmConfig, MAX_STRING_LENGTH};
const MAC_ADDRESS_LENGTH: usize = 17;
#[derive(Debug, Clone, Serialize, Deserialize... | the_stack |
//! A module containing all virtio specific pci functionality
//!
//! The module contains ...
#![allow(dead_code)]
use crate::arch::kernel::pci as kernel_pci;
use crate::arch::kernel::pci::error::PciError;
use crate::arch::kernel::pci::{PciAdapter, PciDriver};
use crate::arch::mm::PhysAddr;
use crate::synch::spinlock:... | the_stack |
use std::collections::{HashMap, HashSet};
use std::fmt::Debug;
use std::hash::Hash;
use std::mem;
pub struct DependencyGraph<K: Eq + Hash, V> {
// Storage for all nodes in the graph.
nodes: Vec<Node<K, V>>,
// Maps keys to the corresponding index in |nodes|.
indices: HashMap<K, usize>,
// Maps no... | the_stack |
pub mod cargo_cmds;
use cargo_cmds::*;
mod executor;
pub use executor::Executor;
mod toolchain;
pub use toolchain::ToolChain;
mod main_result;
pub use main_result::MainResult;
mod edition;
pub use edition::Edition;
use once_cell::sync::Lazy;
mod utils;
use std::{
io::{self, Write},
path::PathBuf,
process:... | the_stack |
extern crate colored;
#[macro_use] extern crate elfkit;
extern crate byteorder;
extern crate goblin;
extern crate sha2;
use elfkit::{
Elf, Header, types, SegmentHeader, Section, SectionContent, Error,
SectionHeader, Dynamic, Symbol, Relocation, Strtab, SymbolSectionIndex};
use elfkit::filetype;
use elfkit::li... | the_stack |
mod helper;
use rvemu::emulator::Emulator;
use rvemu::bus::DRAM_BASE;
#[test]
fn lb_rd_offset_rs1() {
let mut _emu = Emulator::new();
let _data = vec![
0x13, 0x08, 0x50, 0x00, // addi x16, x0, 5
0x93, 0x08, 0x30, 0x00, // addi x17, x0, 3
0x03, 0x09, 0x40, 0x00, // lb x18, 4(x0)
];... | the_stack |
#![allow(dead_code)]
use crate::connectors::utils::{pb, url};
use crate::errors::Result;
use simd_json::Builder;
use tremor_otelapis::opentelemetry::proto::common::v1::{
any_value, AnyValue, ArrayValue, InstrumentationLibrary, KeyValue, KeyValueList, StringKeyValue,
};
use tremor_value::{literal, StaticNode, Value... | the_stack |
use super::util::*;
use super::*;
use crate::api::*;
use crate::def::*;
use crate::tbl::*;
use crate::util::*;
const TX_SHIFT1: usize = BIT_DEPTH - 8 - 1;
const TX_SHIFT2: usize = 6;
const quant_scale: [u16; 6] = [26214, 23302, 20560, 18396, 16384, 14564];
const GET_IEP_RATE: i32 = (32768);
const FAST_RDOQ_INTRA_RND_... | the_stack |
extern crate proc_macro;
extern crate proc_macro2;
extern crate syn;
#[macro_use]
extern crate quote;
use proc_macro::TokenStream;
use std::{cmp::Ordering, collections::HashMap};
// Bit flags indicating what occurs on a particular cycle
const DRAW_PIXEL: u32 = 1;
const SPRITE_DEC_X: u32 = 1 << 1;
const SHIFT_BG_REGIS... | the_stack |
use std::borrow::Cow;
use std::convert::{TryFrom, TryInto};
use std::io::IoSlice;
use crate::cookie::{Cookie, CookieWithFds, VoidCookie};
use crate::errors::{ConnectionError, ParseError, ReplyError, ReplyOrIdError};
use crate::protocol::xproto::Setup;
use crate::protocol::Event;
use crate::utils::RawFdContainer;
use c... | the_stack |
use mio_extras::channel as mio_channel;
#[allow(unused_imports)]
use log::{error, debug, info, warn, trace};
use std::{
thread,
thread::JoinHandle,
collections::HashMap,
time::Duration,
sync::{Arc, RwLock, Mutex, Weak},
net::Ipv4Addr,
};
use crate::log_and_err_internal;
use crate::{
discovery::data_type... | the_stack |
use std::collections::HashMap;
use locutus_stdlib::prelude::{
BufferBuilder, BufferMut, ContractKey, Parameters, StateDelta, StateSummary, UpdateResult,
};
use wasmer::{
imports, Bytes, ImportObject, Instance, Memory, MemoryType, Module, NativeFunc, Store,
};
use crate::{
contract::WrappedState, contract_... | the_stack |
use std::cmp;
use crate::cache::{Cache, NoCache, ZopfliLongestMatchCache};
use crate::hash::{Which, ZopfliHash};
use crate::symbols::{get_dist_symbol, get_length_symbol};
use crate::util::{
ZOPFLI_MAX_CHAIN_HITS, ZOPFLI_MAX_MATCH, ZOPFLI_MIN_MATCH, ZOPFLI_NUM_D, ZOPFLI_NUM_LL,
ZOPFLI_WINDOW_MASK, ZOPFLI_WINDOW... | the_stack |
use super::*;
use crate::rsz_enum;
use crate::rsz_struct;
use serde::*;
use std::ops::Deref;
macro_rules! impl_base {
($name:ty, $base:ty) => {
impl Deref for $name {
type Target = $base;
fn deref(&self) -> &Self::Target {
&self.base
}
}
};
}
... | the_stack |
use crate::als::Als;
use crate::predictor::data::{Data, Entry};
use crate::predictor::kalman::Kalman;
use itertools::Itertools;
use std::sync::mpsc::{Receiver, Sender};
use std::time::Duration;
const INITIAL_BRIGHTNESS_TIMEOUT_SECS: u64 = 2;
const PENDING_COOLDOWN_RESET: u8 = 15;
pub struct Controller {
predictio... | the_stack |
use anyhow::{bail, Result};
use log::{debug, info, warn};
use std::collections::HashSet;
use std::io;
use std::path::Path;
use std::time::{SystemTime, UNIX_EPOCH};
use rd_agent_intf::{HashdCmd, HashdKnobs, HashdReport, Slice, HASHD_A_SVC_NAME, HASHD_B_SVC_NAME};
use rd_hashd_intf;
use rd_util::*;
use super::Config;
u... | the_stack |
use std::collections::HashMap;
use std::error::Error;
use std::thread;
use std::time::Duration;
use clap::{crate_version, App, Arg};
use midir::{Ignore, MidiInput, MidiInputConnection};
pub mod midi;
use midi::{MidiEvent, MidiMessage, MidiNote};
pub mod appstate;
use appstate::AppState;
pub mod notemappings;
use n... | the_stack |
use llvm_sys;
use std::ffi::CString;
use crate::error::*;
use self::llvm_sys::core::*;
use self::llvm_sys::prelude::*;
use self::llvm_sys::LLVMIntPredicate::*;
use self::llvm_sys::LLVMTypeKind;
use crate::codegen::llvm2::intrinsic::Intrinsics;
use crate::codegen::llvm2::llvm_exts::LLVMExtAttribute::*;
use crate::co... | the_stack |
pub mod precache;
pub mod progs;
pub mod world;
use std::{
cell::{Ref, RefCell},
collections::HashMap,
rc::Rc,
};
use crate::{
common::{
console::CvarRegistry,
engine::{duration_from_f32, duration_to_f32},
math::Hyperplane,
model::Model,
parse,
vfs::Vfs,... | the_stack |
use std::{
io::{Error as IoError, ErrorKind, Read, Result as IoResult, Seek, SeekFrom, Write},
pin::Pin,
};
use futures_util::{
io::AsyncRead,
task::{Context, Poll},
};
use kvproto::encryptionpb::EncryptionMethod;
use openssl::symm::{Cipher as OCipher, Crypter as OCrypter, Mode};
use crate::{Iv, Resul... | the_stack |
use crate::kdf;
use hex::decode;
#[test]
fn test_case_1() {
let ikm = decode("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b").unwrap();
let salt = decode("000102030405060708090a0b0c").unwrap();
let info = decode("").unwrap();
let expected_okm_256 =
decode("b2a3d45126d31fb6828ef00d76c6d54e9c2bd47... | the_stack |
use array_tool::vec::*;
use arrow::array::*;
use arrow::datatypes::*;
use arrow::error::ArrowError;
struct ArrayFunctions;
impl ArrayFunctions {
// pub fn array<T>(arrays: Vec<&PrimitiveArray<T>>) -> Result<ListArray, ArrowError> {
// }
/// Checks whether the array contains the given value.
///
/... | the_stack |
use std::cmp::min;
use std::fmt::{self, Debug};
use std::io::{
Error as IoError, ErrorKind, Read, Result as IoResult, Seek, SeekFrom,
Write,
};
use std::sync::Arc;
use serde::{Deserialize, Serialize};
use super::chunk::ChunkMap;
use super::entry::{CutableList, EntryList};
use super::merkle_tree::{Leaves, Merk... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.