text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use crate::virtio::snd::constants::*;
use crate::virtio::snd::layout::*;
use base::{
error, net::UnixSeqpacket, Error as BaseError, Event, FromRawDescriptor, IntoRawDescriptor,
MemoryMapping, MemoryMappingBuilder, MmapError, PollToken, SafeDescriptor, ScmSocket,
SharedMemory, WaitContext,
};
use data_model... | the_stack |
use core::mem;
use arrayvec::ArrayVec;
use binread::io::{Cursor, Read, Seek};
use binread::{BinRead, BinReaderExt};
use enumn::N;
use crate::attribute::NtfsAttributeType;
use crate::attribute_value::NtfsAttributeValue;
use crate::error::{NtfsError, Result};
use crate::file_reference::NtfsFileReference;
use crate::ind... | the_stack |
//! Types and functions for cross-platform text input.
//!
//! Text input is a notoriously difficult problem. Unlike many other aspects of
//! user interfaces, text input can not be correctly modeled using discrete
//! events passed from the platform to the application. For example, many mobile
//! phones implement au... | the_stack |
//! Amounts, denominations, and errors types and arithmetic.
//!
//! This implementation is based on
//! [`rust-bitcoin`](https://github.com/rust-bitcoin/rust-bitcoin/blob/20f1543f79066886b3ae12fff4f5bb58dd8cc1ab/src/util/amount.rs)
//! `Amount` and `SignedAmount` implementations.
//!
use std::cmp::Ordering;
use std::... | the_stack |
pub mod config;
pub mod daemon_connection;
pub mod gpu_controller;
pub mod hw_mon;
use config::{Config, GpuConfig};
use gpu_controller::PowerProfile;
use pciid_parser::PciDatabase;
use rand::prelude::*;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use std::{
collections::{BTreeMap, HashMap},
fs... | the_stack |
use crate::{
opts,
util::{
self,
cli::{Report, TextWrapper},
repo::{self, Repo},
},
};
use std::{
fmt::{self, Display},
io,
path::{Path, PathBuf},
};
#[derive(Debug)]
pub enum Error {
NoHomeDir(util::NoHomeDir),
XcodeSelectFailed(bossy::Error),
StatusFailed(r... | the_stack |
use crate::rule_prelude::*;
use ast::*;
use SyntaxKind::*;
/// Attempt to check if a simple expression is always truthy or always falsey.
///
/// For example, `true`, `false`, and `foo = true`, this does not consider math ops like `0 + 0`.
pub fn simple_bool_coerce(condition: Expr) -> Option<bool> {
match conditio... | the_stack |
extern crate regex;
extern crate unicode_segmentation;
use crate::errors::EstimatorErr;
#[cfg(feature = "python")]
use dict_derive::{FromPyObject, IntoPyObject};
use regex::Regex;
use serde::{Deserialize, Serialize};
use std::fmt;
use unicode_segmentation::UnicodeSegmentation;
#[cfg(test)]
mod tests;
pub trait Token... | the_stack |
use std::net::{TcpStream, Shutdown};
use std::sync::{mpsc, Arc, Mutex};
use crate::hubmsg::*;
#[derive(PartialEq)]
pub enum HubRouteType{
Unknown,
Builder(String),
Clone(String),
UI
}
// wraps a connection to the router either networked or direct.
#[derive(Clone)]
pub enum HubRouteSend {
Networked... | the_stack |
use crate::imgui_wgpu::Renderer;
use crate::nes;
use futures::executor::block_on;
use glob::glob;
use imgui::*;
use imgui_winit_support;
use std::path::PathBuf;
use std::rc::Rc;
use std::time::Instant;
use wgpu::{Device, Queue};
use winit::{
dpi::LogicalSize,
event::{ElementState, Event, KeyboardInput, VirtualK... | the_stack |
#[cfg(not(feature = "nos3"))]
use crate::ffi;
use crate::parse::*;
use failure::Fail;
#[cfg(feature = "nos3")]
use nom::*;
#[cfg(feature = "nos3")]
use rust_i2c::{Command, Connection};
#[cfg(feature = "nos3")]
use std::error::Error;
#[cfg(feature = "nos3")]
use std::io;
#[cfg(not(feature = "nos3"))]
use std::ptr;
#[cfg... | the_stack |
use crate::runtime::execution::ExecutionState;
use crate::runtime::storage::{AlreadyDestructedError, StorageKey, StorageMap};
use crate::runtime::task::clock::VectorClock;
use crate::runtime::thread;
use crate::runtime::thread::continuation::{ContinuationPool, PooledContinuation};
use crate::thread::LocalKey;
use bitve... | the_stack |
use crate::{
common,
indent::{IndentConfig, IndentedWriter},
CodeGeneratorConfig, Encoding,
};
use heck::CamelCase;
use include_dir::include_dir as include_directory;
use serde_reflection::{ContainerFormat, Format, FormatHolder, Named, Registry, VariantFormat};
use std::{
collections::{BTreeMap, HashMap... | the_stack |
mod support;
use csml_interpreter::data::context::Context;
use csml_interpreter::data::event::Event;
use std::collections::HashMap;
use crate::support::tools::format_message;
use crate::support::tools::message_to_json_value;
use serde_json::Value;
////////////////////////////////////////////////////////////////////... | the_stack |
use greenwasm_structure::types::*;
use greenwasm_structure::modules::*;
use greenwasm_structure::instructions::*;
use runtime_structure::*;
use numerics::*;
use modules::*;
use DEBUG_EXECUTION;
#[derive(Debug)]
pub enum ExecutionError {
Trap,
StackExhaustion,
}
use self::ExecutionError::Trap;
impl From<StackE... | the_stack |
mod debug_info;
mod profile_statistics;
mod source_code;
pub use debug_info::{ArrangementDebugInfo, OperatorDebugInfo, RuleDebugInfo};
use source_code::LinesIterator;
pub use source_code::{DDlogSourceCode, SourceFile, SourcePosition};
use profile_statistics::Statistics;
use differential_dataflow::logging::Differenti... | the_stack |
use rlua::prelude::*;
use std::{
sync::{Mutex, Arc},
env,
fs::{self, OpenOptions},
io,
path::Path,
};
#[cfg(target_family = "windows")]
use std::os::windows::fs::symlink_file as symlink;
#[cfg(target_family = "unix")]
use std::os::unix::fs::symlink;
use serde_json;
use rlua_serde;
use crate::bindin... | the_stack |
use std::{
future::Future,
num::{NonZeroU64, NonZeroUsize},
result::Result,
time::Duration,
};
use tokio_retry::{strategy::ExponentialBackoff, Retry as TokioRetry, RetryIf as TokioRetryIf};
pub struct Retry<T, E, Fut, FutureFactory>
where
Fut: Future<Output = Result<T, E>>,
FutureFactory: FnMut... | the_stack |
use std::env;
use std::error::Error;
use std::ffi::OsStr;
use std::fmt::{Debug, Display, Formatter, Result as FmtResult};
use std::ops::{Deref, DerefMut};
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::atomic::AtomicBool;
use std::sync::Arc;
use std::time::Duration;
use err_context::prelude::*;
use libc... | the_stack |
use byteorder::{NativeEndian, ByteOrder};
/// Duplication dictionary size.
///
/// Every four bytes is assigned an entry. When this number is lower, fewer entries exists, and
/// thus collisions are more likely, hurting the compression ratio.
const DICTIONARY_SIZE: usize = 4096;
fn hash(x: u32) -> usize {
let x =... | the_stack |
use crate::id::ProcessId;
use serde::{Deserialize, Serialize};
use std::time::Duration;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct Config {
/// number of processes
n: usize,
/// number of tolerated faults
f: usize,
/// number of shards
shard_count: usize,
... | the_stack |
#![feature(plugin)]
#![plugin(indoc)]
extern crate cursive;
extern crate serde_json;
extern crate termion;
use std::process::{Command, Stdio};
use std::path::Path;
use std::rc::Rc;
use std::str;
use cursive::Cursive;
use cursive::views::{Dialog, TextView, EditView, ListView, BoxView, LinearLayout, SelectView, Panel}... | the_stack |
//! Implementation of two non-blocking queues.
//!
//! - `GeneralYC`, a fast, best-effort queue that will fail
//! occasionally. See documentation of `YangCrummeyQueue` for more
//! information on the algorithm.
//! - `FAAArrayQueue`, a similar design reimplemented in rust. This is
//! lock-free and always succee... | the_stack |
extern crate toml_document;
extern crate winapi;
extern crate kernel32;
use std::fmt::{Display, Error, Formatter};
use std::iter;
use std::mem;
use std::ptr;
use std::slice;
use std::str;
use std::marker::PhantomData;
use toml_document::{ArrayEntry, ArrayValueMut, Container, ContainerKind, Document};
use toml_documen... | the_stack |
extern crate libc;
extern crate cocoa;
use self::libc::{c_void};
use core_foundation::CFMachPortRef;
#[repr(u32)]
#[allow(non_camel_case_types)]
#[allow(dead_code)]
pub enum CGEventTapLocation
{
kCGHIDEventTap = 0,
kCGSessionEventTap,
kCGAnnotatedSessionEventTap
}
#[repr(u32)]
#[allow(dead_code)]
#[allow(... | the_stack |
extern crate rustache;
use rustache::{HashBuilder, Render, VecBuilder};
use std::io::Cursor;
// - name: Falsey
// desc: Falsey sections should have their contents rendered.
// data: { boolean: false }
// template: '"{{^boolean}}This should be rendered.{{/boolean}}"'
// expected: '"This should be rendered."'
#... | the_stack |
use crate::http_token_utils::TokenSimilarity::*;
use crate::http_token_utils::*;
use crate::metrics::*;
use crate::raw_request_parser::{RequestBuffer, COLON, LF, SP};
use crate::HeaderSafetyTier::{Bad, Compliant, NonCompliant};
use crate::{ClassificationReason, ExtHttpRequestData, HeaderSafetyTier, RequestSafetyTier};
... | the_stack |
use std::fmt;
use std::io::{self, Read, Write};
#[cfg(not(target_os = "redox"))]
use std::io::{IoSlice, IoSliceMut};
use std::mem::MaybeUninit;
use std::net::{self, Ipv4Addr, Ipv6Addr, Shutdown};
#[cfg(unix)]
use std::os::unix::io::{FromRawFd, IntoRawFd};
#[cfg(windows)]
use std::os::windows::io::{FromRawSocket, IntoRa... | the_stack |
use phf_generator::HashState;
use phf_shared::PhfHash;
use proc_macro::TokenStream;
use quote::quote;
use std::collections::HashSet;
use std::hash::Hasher;
use syn::parse::{self, Parse, ParseStream};
use syn::punctuated::Punctuated;
#[cfg(feature = "unicase")]
use syn::ExprLit;
use syn::{parse_macro_input, Error, Expr,... | the_stack |
use crate::runtime_info::*;
use crate::services::Service;
use crate::sockets::{Socket, SocketKind, SpecializedSocketConfig};
use crate::units::*;
use std::sync::RwLock;
/// A units has a common part that all units share, like dependencies and a description. The specific part containbs mutable state and
/// the unit-t... | the_stack |
use crate::asn1::{py_oid_to_oid, py_uint_to_big_endian_bytes, PyAsn1Error};
use crate::x509;
use crate::x509::{certificate, crl, oid, sct};
fn encode_general_subtrees<'a>(
py: pyo3::Python<'a>,
subtrees: &'a pyo3::PyAny,
) -> Result<Option<certificate::SequenceOfSubtrees<'a>>, PyAsn1Error> {
if subtrees.is... | the_stack |
mod media_engine_test;
use crate::error::{Error, Result};
use crate::peer_connection::sdp::{
codecs_from_media_description, rtp_extensions_from_media_description,
};
use crate::rtp_transceiver::fmtp;
use crate::rtp_transceiver::rtp_codec::{
codec_parameters_fuzzy_search, CodecMatch, RTCRtpCodecCapability, RTCR... | the_stack |
use super::{
initialize_instance, initialize_vmcontext, InstanceAllocationRequest, InstanceAllocator,
InstanceHandle, InstantiationError,
};
use crate::{instance::Instance, Memory, Mmap, Table, VMContext};
use anyhow::{anyhow, bail, Context, Result};
use rand::Rng;
use std::convert::TryFrom;
use std::marker;
us... | the_stack |
use crate::prelude::*;
use arrayvec::ArrayVec;
use imgui::Ui;
use spark::{vk, Builder};
use std::{ffi::CStr, mem};
/*
The goal is to manage:
* Temporary resources (buffers and images, and their views)
* Render passes and framebuffers
* Barriers and layout transitions
* Synchronisation between queu... | the_stack |
use std::io::Write;
use std::rc::Rc;
use num_bigint::{BigUint, ToBigUint};
use crate::charsets::Charset;
use crate::mask::{parse_mask, validate_charsets, validate_wordlists, MaskOp};
use crate::stackbuf::StackBuf;
use crate::wordlists::{Wordlist, WordlistIterator};
use crate::{BoxResult, MAX_WORD_SIZE};
pub trait Wo... | the_stack |
use futures::{Async, Future, Poll};
use rustls::{Session, ClientConfig, ServerConfig, ClientSession, ServerSession};
use std::fmt;
use std::io::{self, Read, Write};
use std::net::{Shutdown, SocketAddr};
use std::sync::Arc;
use tokio_core::net::TcpStream;
use tokio_io::AsyncWrite;
pub fn client_handshake(tcp: TcpStream... | the_stack |
use {
async_trait::async_trait,
filetime::FileTime,
nix::libc::{O_CREAT, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY},
rs9p::{
srv::{srv_async, Fid, Filesystem},
*,
},
std::{
io::SeekFrom,
os::unix::{fs::PermissionsExt, io::FromRawFd},
path::PathBuf,
},
to... | the_stack |
extern crate timely;
extern crate graph_map;
extern crate differential_dataflow;
use std::io::{BufRead, BufReader};
use std::fs::File;
use timely::dataflow::Scope;
use timely::order::Product;
use differential_dataflow::operators::iterate::SemigroupVariable;
use differential_dataflow::Collection;
use differential_da... | the_stack |
use std::cmp::Ordering;
use log::*;
use tari_common_types::types::{Commitment, CommitmentFactory, PublicKey};
use tari_crypto::{
commitment::HomomorphicCommitmentFactory,
keys::PublicKey as PublicKeyTrait,
script::TariScript,
tari_utilities::{
epoch_time::EpochTime,
hash::Hashable,
... | the_stack |
pub mod common;
// This module contains the definition of `Atlas`.
mod atlas;
// This module contains the definition of `EPaxos`.
mod epaxos;
// This module contains the definition of `Tempo`.
mod tempo;
// This module contains the definition of `FPaxos`.
mod fpaxos;
// This module contains the definition of `Caes... | the_stack |
quantity! {
/// Volume (base unit cubic meter, m³).
quantity: Volume; "volume";
/// Dimension of volume, L³ (base unit cubic meter, m³).
dimension: ISQ<
P3, // length
Z0, // mass
Z0, // time
Z0, // electric current
Z0, // thermodynamic temperat... | the_stack |
use crate::cassandra::collection::List;
use crate::cassandra::collection::Map;
use crate::cassandra::custom_payload::CustomPayload;
// use decimal::d128;
use crate::cassandra::collection::Set;
use crate::cassandra::consistency::Consistency;
use crate::cassandra::error::*;
use crate::cassandra::inet::Inet;
use crate::ca... | the_stack |
use ethers_contract_abigen::{ethers_contract_crate, ethers_core_crate, Source};
use proc_macro2::{Span, TokenStream};
use quote::quote;
use syn::spanned::Spanned as _;
use syn::{parse::Error, AttrStyle, Data, DeriveInput, Field, Fields, Lit, Meta, NestedMeta};
use ethers_core::abi::{param_type::Reader, AbiParser, Even... | the_stack |
use libeir_diagnostics::{Diagnostic, Label, SourceSpan, ToDiagnostic};
use libeir_intern::{Ident, Symbol};
use snafu::Snafu;
use crate::constant::Integer;
use super::ast::{DynToken, Value};
#[derive(Copy, Clone)]
pub enum Nesting {
Top,
Parens(SourceSpan),
Braces(SourceSpan),
MapBraces(SourceSpan),
... | the_stack |
use std::{any::Any, collections::HashMap, error::Error as StdError, fmt};
use lazy_static::lazy_static;
use regex::Regex;
use serde::{Deserialize, Serialize};
use tracing::info;
use mqtt_broker::{
auth::{Activity, Authorization, Authorizer, Operation},
AuthId, BrokerReadyEvent, BrokerReadyHandle, ClientId,
};... | the_stack |
use abstutil::prettyprint_usize;
use geom::{Circle, Distance, Duration, Polygon, Pt2D, Time};
use map_gui::tools::PopupMsg;
use map_gui::ID;
use sim::AlertLocation;
use widgetry::{
Choice, Color, ControlState, DrawWithTooltips, EdgeInsets, EventCtx, GeomBatch, GfxCtx,
HorizontalAlignment, Key, Line, Outcome, Pa... | the_stack |
use maplit::hashmap;
use serde::Deserialize;
use tink_core::Prf;
use tink_prf::subtle::{validate_hkdf_prf_params, HkdfPrf};
use tink_proto::HashType;
struct Rfc5869Test {
hash: HashType,
key: &'static str,
salt: &'static str,
info: &'static str,
output_length: usize,
okm: &'static str,
}
#[tes... | the_stack |
#![deny(warnings)]
// Enable all clippy lints except for many of the pedantic ones. It's a shame this needs to be copied and pasted across crates, but there doesn't appear to be a way to include inner attributes from a common source.
#![deny(
clippy::all,
clippy::default_trait_access,
clippy::expl_impl_clone_on_c... | the_stack |
//! The RSA public-key cryptosystem.
mod bits;
pub use public::rsa::bits::{RsaKeyBits, B2048, B3072, B4096, B6144, B8192};
use std::convert::TryInto;
use std::fmt::{self, Debug, Display, Formatter};
use std::marker::PhantomData;
use boringssl::{self, BoringError, CHeapWrapper, CStackWrapper};
use hash::{inner::Dige... | the_stack |
mod handlers_dispatcher;
mod rewrite_controller;
#[macro_use]
mod settings;
use self::handlers_dispatcher::ContentHandlersDispatcher;
use self::rewrite_controller::*;
use crate::memory::MemoryLimitExceededError;
use crate::memory::MemoryLimiter;
use crate::parser::ParsingAmbiguityError;
use crate::selectors_vm::{self... | the_stack |
#![allow(unused_unsafe)]
//! Contains the slot map implementation.
#[cfg(all(nightly, any(doc, feature = "unstable")))]
use alloc::collections::TryReserveError;
use alloc::vec::Vec;
use core::fmt;
use core::iter::{Enumerate, FusedIterator};
use core::marker::PhantomData;
#[allow(unused_imports)] // MaybeUninit is onl... | the_stack |
pub struct GetResourcePoliciesPaginator<
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_resource_policies_input::Builder,
}
impl<C, M... | the_stack |
use crate::{artifact::*, clients};
use crossbeam_channel::{Receiver, RecvTimeoutError, Sender};
use ic_interfaces::{
artifact_manager::{ArtifactProcessor, ProcessingResult},
artifact_pool::UnvalidatedArtifact,
certification,
certification::{Certifier, CertifierGossip, MutableCertificationPool},
cons... | the_stack |
use super::{NtpTimeStamp, UtcDateTime, CMD_REQUEST_TW_SESSION, MBZ};
use crate::error::AgentError;
use crate::proto::frame::{FrameReader, FrameWriter};
use bytes::{Buf, BufMut, BytesMut};
use std::cmp::{Eq, PartialEq};
use std::net::IpAddr;
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum IpVn {
V4,
V6,
}
/// ... | the_stack |
use log::trace;
use crate::core::battle::{
ability::{self, Ability},
component::{self, Component, Parts, PlannedAbility},
effect::{self, Duration, Effect},
event::{self, ActiveEvent, Event},
state, Attacks, Id, Jokers, Moves, Phase, PlayerId, State, Strength,
};
pub fn apply(state: &mut State, eve... | the_stack |
use core::convert::TryFrom;
use core::iter::FusedIterator;
use scolapasta_string_escape::InvalidUtf8ByteSequence;
#[derive(Debug, Clone)]
struct Delimiters {
bits: u8,
}
impl Default for Delimiters {
fn default() -> Self {
Self::DEFAULT
}
}
impl Delimiters {
const EMIT_LEFT_DELIMITER: Self =... | the_stack |
use std::fmt;
use std::mem;
use std::ops::Deref;
use std::sync::Arc;
use std::sync::atomic::{Ordering, AtomicUsize};
use take_mut::take;
use parking_lot::{RwLock, RwLockReadGuard};
use kailua_env::{Span, Spanned};
use kailua_syntax::ast::{M, MM};
use diag::Origin;
use super::{Dyn, Nil, T, Ty, TypeContext, Lattice, Uni... | the_stack |
use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender};
use futures::{SinkExt, StreamExt};
use tokio::time;
use crate::protocol::Instruction;
use crate::state_machine::{BoxedState, StateMachineTraits, Transition};
use std::collections::VecDeque;
/// Finite state machine
///
/// The machine is implemented a... | the_stack |
macro_rules! memory_limiter_tests {
( $( $region_id:ident => $TestRegion:path ),* ) => {
$(
mod $region_id {
use lazy_static::lazy_static;
use lucet_runtime::{DlModule, Limits, Region, RegionCreate, MemoryLimiter};
use std::sync::Mutex;
... | the_stack |
use hacspec_lib::*;
const BLOCKSIZE: usize = 16;
const IVSIZE: usize = 12;
bytes!(Block, BLOCKSIZE);
bytes!(Word, 4);
bytes!(RoundKey, BLOCKSIZE);
bytes!(Nonce, IVSIZE);
bytes!(SBox, 256);
bytes!(RCon, 15);
// for aes128
bytes!(Bytes144, 144);
bytes!(Bytes176, 176);
// for aes256
bytes!(Bytes208, 208);
bytes!(Bytes240... | the_stack |
use crate::asm::Instruction;
use crate::asm::MemoryBank;
use crate::asm::{BinaryOperation, Body, JumpMode, Terminator};
use crate::compiler::Compiler;
use crate::lexer::Register;
use crate::lexer::{Const, Operand};
use crate::span::Spanned;
use cranelift_codegen::ir::condcodes::IntCC;
use cranelift_codegen::ir::types::... | the_stack |
#![deny(unsafe_code)]
use core::fmt;
pub use defaults::Histogram as DefaultHistogram;
/// This trait represents the bare minimum functionality needed
/// to interact with an implementation by a mutator
pub trait Histogram: fmt::Display {
/// Add a sample to the histogram.
///
/// Fails if the sample is o... | the_stack |
use std::fs::File;
use std::io::Read;
use std::net::Ipv4Addr;
type Error = Box<dyn std::error::Error>;
type Result<T> = std::result::Result<T, Error>;
pub struct BytePacketBuffer {
pub buf: [u8; 512],
pub pos: usize,
}
impl BytePacketBuffer {
/// This gives us a fresh buffer for holding the packet conten... | the_stack |
use std::{slice, str, str::FromStr};
use project::{Action, action_kind, action_type, argument_type};
use crate::ErrorPrinter;
use crate::symbol::Symbol;
use crate::front::{ast, Lexer, Parser, Span};
pub struct ActionParser<'s, 'e, 'f> {
reader: slice::Iter<'s, Action<'s>>,
errors: &'e mut ErrorPrinter<'f>,
... | the_stack |
//! # wapc
//!
//! The `wapc` crate provides a high-level WebAssembly host runtime that conforms to an RPC mechanism
//! called **waPC**. waPC is designed to be a fixed, lightweight standard allowing both sides of the
//! guest/host boundary to make method calls containing arbitrary binary payloads. Neither side
//! of... | the_stack |
//! Alter events in various ways.
//!
//! This modules contains "event filters" that can change, drop or create new events. To use them,
//! import `Filter` trait and call `filter()` function on `Option<Event>`. Because `filter` also
//! returns `Option<Event>` you can combine multiple filters by using `filter()` funct... | the_stack |
//! This test generate P2P message structures of various sizes, aiming at
//! hitting enconding boundaries, like list lenght and dynamic and bounded
//! encoding sizes. Currently the following table represent this test coverage
//! (as measured by catching size-related errors reported by encoding
//! operation): [limit... | the_stack |
clippy::or_fun_call,
clippy::cast_sign_loss,
clippy::option_as_ref_deref,
clippy::needless_pass_by_value,
clippy::doc_markdown,
clippy::match_same_arms
)]
use std::sync::Arc;
use arrow::ipc::{
Buffer as BufferMessage, FieldNode as NodeMessage, MessageBuilder, MessageHeader,
MetadataVersion... | the_stack |
//! Overloadable operators.
//!
//! Implementing these traits allows you to overload certain operators.
//!
//! Some of these traits are imported by the prelude, so they are available in
//! every Rust program. Only operators backed by traits can be overloaded. For
//! example, the addition operator (`+`) can be overlo... | the_stack |
use crate::{
validation::{expected_export_name, validate_module},
StringEncoding,
};
use anyhow::{bail, Context, Result};
use indexmap::IndexMap;
use std::{
collections::{hash_map::Entry, HashMap, HashSet},
hash::{Hash, Hasher},
ops::BitOr,
};
use wasm_encoder::*;
use wasmparser::{Validator, WasmFea... | the_stack |
#![crate_name = "sos_alloc"]
#![crate_type = "lib"]
// The compiler needs to be instructed that this crate is an allocator in order
// to realize that when this is linked in another allocator like jemalloc
// should not be linked in
#![cfg_attr( feature = "system", feature(allocator) )]
#![cfg_attr( feature = "system"... | the_stack |
use std::cell::{Cell, RefCell};
use std::rc::Rc;
use std::collections::HashMap;
use std::collections::hash_map::Entry;
use std::borrow::Cow;
use internals::ast::structs::{KeyVal, WSSep, TOMLValue, ErrorCode, HashValue, TableType, Table, get_last_keys};
use types::{Date, Time, DateTime, TimeOffset, TimeOffsetAmount, Par... | the_stack |
use super::*;
use crate::libs::diff_mix;
use std::collections::VecDeque;
use wasm_bindgen::{prelude::*, JsCast};
pub struct Renderer {
befores: VecDeque<Node>,
document: web_sys::Document,
}
impl Renderer {
pub fn new() -> Self {
Self {
befores: VecDeque::new(),
document: w... | the_stack |
dead_code,
mutable_transmutes,
non_camel_case_types,
non_snake_case,
non_upper_case_globals,
unused_assignments,
unused_mut
)]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::type_complexity)]
use std::ffi::CString;
use std::io::SeekFrom;
use std::io::{prelude::*, Result};
use std::ptr::... | the_stack |
use num_complex::Complex;
use core::arch::aarch64::*;
use crate::algorithm::{bitreversed_transpose, reverse_bits};
use crate::array_utils;
use crate::common::{fft_error_inplace, fft_error_outofplace};
use crate::neon::neon_butterflies::{
NeonF32Butterfly1, NeonF32Butterfly16, NeonF32Butterfly2, NeonF32Butterfly32... | the_stack |
use crate::check_args;
use crate::eval_ptr::EvalPtr;
use crate::interp::Interp;
use crate::types::ContextID;
use crate::types::Exception;
use crate::types::MoltResult;
use crate::types::VarName;
use crate::util::is_varname_char;
use crate::value::Value;
/// A compiled script, which can be executed in the context of an... | the_stack |
use std::cell::Cell;
use std::cmp::Ordering;
use std::collections::BinaryHeap;
use super::util::Shared;
use serde::{Deserialize, Serialize};
const NUM_EVENTS: usize = 32;
#[repr(u32)]
#[derive(Serialize, Deserialize, Debug, PartialOrd, PartialEq, Eq, Copy, Clone)]
pub enum GpuEvent {
HDraw,
HBlank,
VBla... | the_stack |
use {
::input_pipeline::text_settings,
anyhow::Error,
fidl_fuchsia_input_injection::InputDeviceRegistryRequestStream,
fidl_fuchsia_input_keymap as fkeymap,
fidl_fuchsia_session_scene::{ManagerRequest, ManagerRequestStream},
fidl_fuchsia_ui_accessibility_view::{RegistryRequest, RegistryRequestStr... | the_stack |
use crate::{FileSystem, VfsFileType};
use crate::{SeekAndRead, VfsMetadata};
use crate::{VfsError, VfsResult};
use core::cmp;
use std::collections::HashMap;
use std::fmt;
use std::fmt::{Debug, Formatter};
use std::io::{Cursor, Read, Seek, SeekFrom, Write};
use std::mem::swap;
use std::sync::{Arc, RwLock};
type MemoryF... | the_stack |
// BEGIN - Embark standard lints v0.3
// do not change or add/remove here, but one can add exceptions after this section
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
#![deny(unsafe_code)]
#![warn(
clippy::all,
clippy::await_holding_lock,
clippy::dbg_macro,
clippy::de... | the_stack |
use crate::pass::Pass;
use crate::prim::*;
use crate::{ast::*, Config};
use nom::branch::alt;
use nom::bytes::complete::tag;
use nom::character::complete::{alphanumeric1, digit1, multispace1};
use nom::combinator::{all_consuming, complete, map, map_res, opt, recognize, value, verify};
use nom::multi::{many0, many1, sep... | the_stack |
#![warn(
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
trivial_numeric_casts,
unused_extern_crates,
unused_import_braces,
unused_qualifications,
unused_results,
clippy::pedantic
)] // from https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md
use c... | the_stack |
extern crate binjs;
extern crate itertools;
use binjs::generic::{IdentifierName, InterfaceName, Offset, PropertyKey, SharedString};
use binjs::io::entropy;
use binjs::io::entropy::dictionary::{
DictionaryBuilder, FilesContaining, LinearTable, Options as DictionaryOptions,
};
use binjs::io::entropy::rw::TableRefStr... | the_stack |
#![allow(non_snake_case)]
#![allow(clippy::large_enum_variant)]
use curv::cryptographic_primitives::secret_sharing::feldman_vss::VerifiableSS;
use curv::elliptic::curves::traits::ECPoint;
use curv::{BigInt, FE, GE};
use serde::{Deserialize, Serialize};
use zeroize::Zeroize;
/// key generation related message data type... | the_stack |
// The tree builder rules, as a single, enormous nested match expression.
use markup5ever::{namespace_prefix, namespace_url, ns, tendril::SliceExt, local_name};
use crate::tokenizer::states::{Rawtext, Rcdata};
use crate::{expanded_name, y_name};
fn current_node<Handle>(open_elems: &[Handle]) -> &Handle {
open_e... | the_stack |
#[cfg(feature = "O3")]
extern crate blas;
#[cfg(feature = "O3")]
use blas::{daxpy, ddot, dnrm2, idamax};
use crate::structure::matrix::{matrix, Matrix, Row};
use crate::traits::{
fp::FPVector,
general::Algorithm,
math::{InnerProduct, LinearOp, Norm, Normed, Vector, VectorProduct},
mutable::MutFP,
n... | the_stack |
//! A version of elfmalloc tailored to the `Alloc` trait.
//!
//! This module is an attempt at creating a variant of elfmalloc that follows Rust's own allocation
//! idioms. Unlike the traditional `malloc`/`free` interface, Rust's `Alloc` trait passes size and
//! alignment at the call site for both allocations and dea... | the_stack |
use std::str;
use chrono::{DateTime, Utc};
use hmac::{Hmac, Mac, NewMac};
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
use sha2::{Digest, Sha256};
use url::Url;
use crate::region::Region;
use anyhow::anyhow;
use anyhow::Result;
use http::HeaderMap;
const SHORT_DATE: &str = "%Y%m%d";
const LONG_DA... | the_stack |
use std::ffi::{CStr, CString};
use std::fmt;
use std::mem::size_of;
#[cfg(feature = "pg-ldc-messages")]
use std::ops::Deref;
#[cfg(feature = "pg-ldc-messages")]
use std::slice::from_raw_parts;
#[cfg(feature = "pg-ldc-messages")]
extern crate base64;
extern crate libc;
extern crate rpgffi as pg;
#[cfg(feature = "pg-ldc... | the_stack |
use crate::core::shared_access_signature::{format_date, format_form, sign, SasProtocol, SasToken};
use chrono::{DateTime, Utc};
use std::{fmt, marker::PhantomData};
const SERVICE_SAS_VERSION: &str = "2020-06-12";
pub enum BlobSignedResource {
Blob, // b
BlobVersion, // bv
BlobSnapshot, // bs
... | the_stack |
use lazy_static::lazy_static;
use log::Level;
use ndk::input_queue::InputQueue;
use ndk::looper::{FdEvent, ForeignLooper, ThreadLooper};
use ndk::native_activity::NativeActivity;
use ndk::native_window::NativeWindow;
use ndk_sys::{AInputQueue, ANativeActivity, ANativeWindow, ARect};
use std::ffi::{CStr, CString};
use s... | the_stack |
mod client;
mod informer;
mod metrics;
pub(crate) mod reconcile;
pub(crate) mod resource_map;
mod server;
#[cfg(feature = "testkit")]
pub mod testkit;
#[cfg(feature = "testkit")]
use crate::resource::ObjectIdRef;
use crate::config::{ClientConfig, OperatorConfig, UpdateStrategy};
use crate::handler::{Handler, SyncReq... | the_stack |
use super::{lovense_dongle_device_impl::*, lovense_dongle_messages::*};
use crate::server::comm_managers::DeviceCommunicationEvent;
use async_trait::async_trait;
use futures::{select, FutureExt};
use std::sync::{
atomic::{AtomicBool, Ordering},
Arc,
};
use tokio::sync::mpsc::{channel, Receiver, Sender};
// I found... | the_stack |
use core::convert::TryInto;
use crate::api::*;
use crate::error::Error;
use crate::service::*;
use crate::types::*;
#[inline(never)]
fn load_secret_key(keystore: &mut impl Keystore, key_id: &KeyId)
-> Result<p256_cortex_m4::SecretKey, Error>
{
// info_now!("loading keypair");
let secret_scalar: [u8; 32] ... | the_stack |
#![stable(feature = "rust1", since = "1.0.0")]
use crate::fmt;
use crate::intrinsics;
///////////////////////////////////////////////////////////////////////////////
// Any trait
///////////////////////////////////////////////////////////////////////////////
/// A trait to emulate dynamic typing.
///
/// Most types ... | the_stack |
use super::{
ChannelReceiveAccess, ChannelReceiveFuture, ChannelSendError, CloseStatus,
RecvPollState, RecvWaitQueueEntry,
};
use crate::{
intrusive_double_linked_list::{LinkedList, ListNode},
utils::update_waker_ref,
NoopLock,
};
use core::marker::PhantomData;
use futures_core::task::{Context, Poll... | the_stack |
use zoon::{*, eprintln};
use crate::connection::connection;
use shared::{UpMsg, ClientId, TimeBlockId, InvoiceId, time_blocks::{self, TimeBlockStatus}};
use std::sync::Arc;
mod view;
// ------ ------
// Types
// ------ ------
struct Client {
id: ClientId,
name: String,
time_blocks: MutableVec<Arc<Tim... | the_stack |
use crate::{
errors::PollWfError,
job_assert,
pollers::MockServerGatewayApis,
test_help::{
build_fake_core, build_mock_pollers, build_multihist_mock_sg, canned_histories,
gen_assert_and_fail, gen_assert_and_reply, hist_to_poll_resp, mock_core, poll_and_reply,
poll_and_reply_clear... | the_stack |
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use callgraph::byte... | the_stack |
use rustler::{
dynamic::TermType,
env::{OwnedEnv, SavedTerm},
resource::ResourceArc,
types::tuple::make_tuple,
types::ListIterator,
Encoder, Env as RustlerEnv, MapIterator, NifResult, Term,
};
use std::sync::Mutex;
use std::thread;
use wasmer::{ChainableNamedResolver, Instance, Type, Val, Value... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.