text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use super::location::{Location, Span};
#[derive(Clone)]
struct StringStream {
input: Vec<char>,
index: usize,
line: i32,
column: i32,
}
impl StringStream {
fn new(input: &str) -> Self {
Self {
input: input.chars().collect(),
index: 0,
line: 1,
... | the_stack |
use crate::{Expression, Abstraction, Application, Variable};
/// A reduction strategy for an [`Expression`]
pub enum Strategy {
// Innermost reductions
// *ao* -> normal
Applicative(bool),
// *bv*: not inside abstractions -> weak normal
CallByValue,
// ha: ao + bv -> normal
HybridApplicati... | the_stack |
use crate::SampleCube;
use shared::*;
use spirv_std::glam::{
const_vec2, vec2, vec3, Vec2, Vec2Swizzles, Vec3, Vec3Swizzles, Vec4, Vec4Swizzles,
};
// Note: This cfg is incorrect on its surface, it really should be "are we compiling with std", but
// we tie #[no_std] above to the same condition, so it's fine.
#[cf... | the_stack |
use crate::binary::read::ReadCtxt;
use crate::binary::U8;
use crate::cff::outline::argstack::ArgumentsStack;
use crate::cff::outline::{Builder, CFFError, IsEven};
use crate::outline::OutlineSink;
use crate::tables::Fixed;
pub(crate) struct CharStringParser<'a, B>
where
B: OutlineSink,
{
pub stack: ArgumentsSta... | the_stack |
use crate::{
functions::{Function, FunctionArg, FunctionList},
generators::rust_plugin::generate_type_bindings,
primitives::Primitive,
types::{TypeIdent, TypeMap},
};
use proc_macro2::{Punct, TokenStream};
use quote::{format_ident, quote, ToTokens};
use std::{fs, str::FromStr};
use syn::token::Async;
p... | the_stack |
use std::fs;
use std::fs::File;
use std::io::{Read, Seek, SeekFrom};
use std::path::{Path, PathBuf};
use anyhow::{anyhow, bail, ensure, Result};
use bytes::Bytes;
use tracing::*;
use crate::relish::*;
use crate::repository::*;
use crate::walingest::WalIngest;
use postgres_ffi::relfile_utils::*;
use postgres_ffi::wald... | the_stack |
use std::convert::TryInto;
use std::collections::BTreeSet;
use std::time::Instant;
use rewind_core::mem::{self, VirtMemError};
use rewind_core::trace::{self, ProcessorState, Context, Params, Tracer, Trace, EmulationStatus, TracerError};
use rewind_core::snapshot::Snapshot;
use bochscpu::cpu::{Cpu, RunState, S... | the_stack |
//! A collection of parsed date and time items.
//! They can be constructed incrementally while being checked for consistency.
use num_traits::ToPrimitive;
use oldtime::Duration as OldDuration;
use {Datelike, Timelike};
use Weekday;
use div::div_rem;
use offset::{TimeZone, Offset, LocalResult, FixedOffset};
use naive... | the_stack |
#[macro_use]
extern crate log;
extern crate env_logger;
#[macro_use]
extern crate clap;
extern crate ordered_float;
extern crate thrift;
extern crate thrift_test;
use ordered_float::OrderedFloat;
use std::collections::{BTreeMap, BTreeSet};
use std::thread;
use std::time::Duration;
use thrift::protocol::{TBinaryInput... | the_stack |
use std::sync::Arc;
use futures::{Async, Future};
use futures::stream::{Stream};
use futures::sink::{Sink};
use futures::future::{Either};
use tk_http::Status;
use tk_http::server::{Error, Codec, RecvMode};
use tk_http::server as http;
use tk_http::websocket::{self, ServerCodec as WebsocketCodec, Packet, Accept};
use ... | the_stack |
use crate::sip128::SipHasher128;
use rustc_index::bit_set;
use rustc_index::vec;
use smallvec::SmallVec;
use std::hash::{BuildHasher, Hash, Hasher};
use std::mem;
#[cfg(test)]
mod tests;
/// When hashing something that ends up affecting properties like symbol names,
/// we want these symbol names to be calculated ind... | the_stack |
fn remaining(chars: &mut MultiPeek<Chars>) -> usize {
let mut index: usize = 0;
while let Some(_) = chars.peek().cloned() {
index += 1;
}
chars.reset_peek();
index
}
/// Counts the amount of mismatched braces current.
fn brace_counter(tokens: &[Token]) -> usize {
let mut counter: usize =... | the_stack |
pub use self::StabilityLevel::*;
use crate::ty::{self, DefIdTree, TyCtxt};
use rustc_ast::NodeId;
use rustc_attr::{self as attr, ConstStability, Deprecation, Stability};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::{Applicability, DiagnosticBuilder};
use rustc_feature::GateIssue;
use rustc_... | the_stack |
use crate::error::*;
use crate::rr::dnssec::{Algorithm, Digest, DigestType};
use crate::rr::record_data::RData;
use crate::rr::Name;
use crate::serialize::binary::{
BinDecodable, BinDecoder, BinEncodable, BinEncoder, Restrict, RestrictedMath,
};
/// [RFC 4034](https://tools.ietf.org/html/rfc4034#section-2), DNSSEC... | the_stack |
use super::errors::Error;
use crate::provider::Provider;
use crate::utils::{get_gas_perf, get_gas_reward};
use address::Address;
use async_std::sync::RwLock;
use blocks::Tipset;
use encoding::Cbor;
use log::warn;
use message::{Message, SignedMessage};
use num_bigint::BigInt;
use slotmap::{new_key_type, SlotMap};
use st... | the_stack |
//! Avro to Arrow array readers
use crate::arrow::array::{
make_array, Array, ArrayBuilder, ArrayData, ArrayDataBuilder, ArrayRef,
BooleanBuilder, LargeStringArray, ListBuilder, NullArray, OffsetSizeTrait,
PrimitiveArray, PrimitiveBuilder, StringArray, StringBuilder,
StringDictionaryBuilder,
};
use cra... | the_stack |
use std::{error::Error, path::PathBuf, sync::Mutex};
use capnp_rpc::{pry, rpc_twoparty_capnp, twoparty, RpcSystem};
use crossbeam_channel::{unbounded, Receiver, Sender};
use distill_core::{distill_signal, utils, AssetMetadata, AssetUuid};
use distill_schema::{data::asset_change_event, parse_db_metadata, service::asset... | the_stack |
use abi_stable::{
external_types::{RawValueRef,RawValueBox},
nonexhaustive_enum::{NonExhaustiveFor,DeserializeEnum,SerializeEnum},
library::RootModule,
sabi_types::{VersionStrings},
std_types::{RBox,RString,RResult,RStr,RBoxError,RVec},
sabi_trait,
StableAbi,
package_version_strings,
... | the_stack |
//#![deny(missing_docs)]
#![no_std]
pub extern crate typenum;
#[cfg(feature = "serde")]
extern crate serde;
mod hex;
mod impls;
#[cfg(feature = "serde")]
pub mod impl_serde;
use core::{mem, ptr, slice};
use core::marker::PhantomData;
use core::mem::ManuallyDrop;
pub use core::mem::transmute;
use core::ops::{Deref,... | the_stack |
use std::iter;
use std::mem;
use std::str;
use crate::ast::{Constant, ConversionFlag, Expr, ExprKind, Location};
use crate::error::{FStringError, FStringErrorType, ParseError};
use crate::parser::parse_expression;
use self::FStringErrorType::*;
struct FStringParser<'a> {
chars: iter::Peekable<str::Chars<'a>>,
... | the_stack |
use crate::point::Point;
use image::GrayImage;
use num::{cast, Num, NumCast};
use std::collections::VecDeque;
/// Whether a border of a foreground region borders an enclosing background region or a contained background region.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum BorderType {
/// A border between ... | the_stack |
#![doc(hidden)]
use lexical_util::format::NumberFormat;
use lexical_util::num::{as_cast, Integer, UnsignedInteger};
use lexical_util::step::max_step;
/// Return an error, returning the index and the error.
macro_rules! into_error {
($code:ident, $index:expr) => {
Err((lexical_util::error::Error::$code($in... | the_stack |
use std::{
cell::RefCell,
rc::Rc,
sync::{Arc, Mutex},
};
use smithay::{
backend::renderer::buffer_dimensions,
reexports::{
wayland_protocols::xdg_shell::server::xdg_toplevel,
wayland_server::{
protocol::{wl_buffer, wl_output, wl_pointer::ButtonState, wl_shell_surface, wl... | the_stack |
use crate::{
errors::JsonRpcError,
views::{
AccountStateWithProofView, AccountTransactionsWithProofView, AccountView,
AccumulatorConsistencyProofView, CurrencyInfoView, EventByVersionWithProofView, EventView,
EventWithProofView, MetadataView, StateProofView, TransactionListView, Transact... | the_stack |
use crate::{
attr_derivation::{
find_attr_slice, new_borrow_exp, new_call_exp, new_full_name, new_fun, new_simple_name_exp,
new_simple_type, new_u64, new_var,
},
diag,
parser::ast::{
Definition, Exp, Exp_, Function, FunctionName, LeadingNameAccess_, ModuleDefinition,
Modu... | the_stack |
use crate::processor::Word;
use crate::r2_api::hex_encode;
use crate::radius::{Radius, RadiusOption};
use boolector::BV;
use clap::{App, Arg};
use std::time::Instant;
// use crate::state::State;
use crate::value::Value;
use ahash::AHashMap;
type HashMap<P, Q> = AHashMap<P, Q>;
pub mod memory;
pub mod operations;
pub... | the_stack |
#![feature(rustc_private)]
extern crate libc;
use std::fs::{
File, create_dir, OpenOptions, read_dir, remove_dir, remove_dir_all, remove_file, rename,
};
use std::ffi::CString;
use std::io::{Read, Write, Error, ErrorKind, Result, Seek, SeekFrom};
use std::path::{PathBuf, Path};
fn main() {
test_file();
... | the_stack |
// Instead of trying to read this code, check out the TypeScript version
#![allow(non_upper_case_globals)]
// #![cfg_attr(not(feature = "std"), no_std)]
use lazy_static::lazy_static;
// #[cfg(feature = "std")]
use std::{convert::TryInto, io::{Read, Write, Error, ErrorKind}, ops::Range, vec::Vec};
const fleb: [usize;... | the_stack |
use crate::{abi::*, next_port};
use anvil::{spawn, NodeConfig};
use ethers::{
contract::ContractFactory,
prelude::{
signer::SignerMiddlewareError, BlockId, Middleware, Signer, SignerMiddleware,
TransactionRequest,
},
types::{Address, BlockNumber, Transaction, TransactionReceipt, H256, U2... | the_stack |
//! Logic for serde-compatible serialization.
use crate::{types::Value, Error};
use serde::{ser, Serialize};
use std::{collections::HashMap, iter::once};
#[derive(Clone, Default)]
pub struct Serializer {}
pub struct SeqSerializer {
items: Vec<Value>,
}
pub struct SeqVariantSerializer<'a> {
index: u32,
va... | the_stack |
use crate::master_key::MasterKeyProvider;
use crate::server_suite::coding::CodingItem;
use crate::server_suite::config::SERVER_CONFIG;
use crate::server_suite::store::{CustomerKey, KeyVec, LegacyDataKey, OwnedStore, Sensitives};
use crate::util;
use crate::KeyhouseImpl;
use crate::{prelude::*, Metric};
use arc_swap::Ar... | the_stack |
use futures::TryStreamExt;
use iml_influx::{Client, Error as InfluxError, Point, Points, Precision, Value};
use iml_manager_env::{get_influxdb_addr, get_influxdb_metrics_db, get_pool_limit};
use iml_postgres::{get_db_pool, host_id_by_fqdn, sqlx, PgPool};
use iml_service_queue::service_queue::consume_data;
use iml_wire_... | the_stack |
use crate::abi::{RecursivePointeeCache, TyLayoutNameKey};
use crate::builder_spirv::SpirvValue;
use crate::codegen_cx::CodegenCx;
use bimap::BiHashMap;
use indexmap::IndexSet;
use rspirv::dr::Operand;
use rspirv::spirv::{Capability, Decoration, Dim, ImageFormat, StorageClass, Word};
use rustc_data_structures::fx::FxHas... | the_stack |
use crate::core_types::{IsEqualApprox, Vector3};
// TODO enforce invariants via setters, make fields private
// Otherwise almost all methods need to panic
// - normal.length() == 1
// - d > 0
/// 3D plane in Hessian form: `a*b + b*y + c*z + d = 0`
///
/// Note: almost all methods on `Plane` require that the `normal` ... | the_stack |
//! Routines for initialization of STM32F7.
//!
//! This module includes code for setting up the clock, flash, access time and
//! performing initial peripheral configuration.
use hal::mem_init::init_data;
use core::intrinsics::abort;
#[path="../../util/ioreg.rs"]
#[macro_use] mod ioreg;
#[path="../../util/wait_for.r... | the_stack |
use std::cmp::Ordering;
use std::fmt::{self, Formatter};
use crate::conventional::error::ConventionalCommitError;
use crate::SETTINGS;
use chrono::{NaiveDateTime, Utc};
use colored::*;
use conventional_commit_parser::commit::ConventionalCommit;
use git2::Commit as Git2Commit;
use log::info;
use serde::{Deserialize, Se... | the_stack |
//! Pixel format utility routines.
use num::iter::range;
use std::cmp;
use std::io::{Write, BufWriter};
/// 8-bit Y plane followed by 8-bit 2x2-subsampled U and V planes.
#[derive(Copy, Clone, Debug)]
pub struct I420;
/// 8-bit Y plane followed by an interleaved U/V plane containing 2x2 subsampled color difference
/... | the_stack |
use log::{error, trace};
use nom::{
bytes::streaming::take,
combinator::{map, map_parser, verify},
Err, IResult, Needed,
};
use std::convert::TryFrom;
/*
struct Document {
header: Header,
body: Vec<Element>,
}
struct Header {}
#[derive(Debug)]
enum ElementData {
Signed(i64),
Unsigned(u64... | the_stack |
use std::marker::PhantomPinned;
use std::mem::ManuallyDrop;
use std::ptr::NonNull;
use std::task::{Context, Waker};
use crate::loom::cell::UnsafeCell;
use crate::loom::sync::{Arc, Mutex};
use crate::util::linked_list::{self, Link};
use crate::util::{waker_ref, Wake};
type LinkedList<T> =
linked_list::LinkedList<L... | the_stack |
#![feature(libc, test)]
extern crate uuid;
extern crate futures;
extern crate tickgrinder_util;
extern crate libc;
extern crate test;
extern crate redis;
use std::collections::HashMap;
use std::ffi::CString;
use std::ptr::drop_in_place;
use std::thread;
use std::slice;
use std::str;
use std::sync::Mutex;
use libc::{... | the_stack |
// TODO: A few of these dependencies (including js_sys) are used to power events.. yet events
// only work on wasm32 targets. So we should start sprinkling some
//
// #[cfg(target_arch = "wasm32")]
// #[cfg(not(target_arch = "wasm32"))]
//
// Around in order to get rid of dependencies that we don't need in non wasm32 t... | the_stack |
pub mod sdp;
use std::fmt;
use std::io;
use std::error::Error as ErrorTrait;
use std::fmt::{Display, Formatter};
use std::str::FromStr;
use std::time::Duration;
use bytes::BytesMut;
use futures::sink::SinkExt;
use futures::stream::StreamExt;
use tokio::net::TcpStream;
use tokio_util::codec::{Decoder, Encoder};
u... | the_stack |
use crate::data::{
ast::*,
data::{init_child_context, init_child_scope, Data},
error_info::ErrorInfo,
literal::create_error_info,
primitive::PrimitiveClosure,
tokens::*,
warnings::DisplayWarnings,
ArgsType, Literal, MemoryType, MessageData, Position, MSG,
};
use crate::error_format::*;
u... | the_stack |
use jtd_codegen::target::{self, inflect, metadata};
use jtd_codegen::Result;
use lazy_static::lazy_static;
use std::collections::BTreeSet;
use std::io::Write;
lazy_static! {
static ref KEYWORDS: BTreeSet<String> = include_str!("keywords")
.lines()
.map(str::to_owned)
.collect();
static ... | the_stack |
use core::fmt::Write;
use std::fmt::{Display, Error as FmtError, Formatter};
use crate::ast::*;
use crate::check::read_back::*;
impl Display for Value {
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
match self {
Value::Lambda(closure) => {
f.write_str("\u{03BB} ")?... | the_stack |
// /// Vector-vector operations.
// #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
// macro_rules! makefn_vops_binary_simd {
// ($opname: ident, $op: tt, $unsafeop: tt) => {
// #[doc = "Implements a loop-unrolled version of the `"]
// #[doc = stringify!($op)]
// #[doc = "` function... | the_stack |
use std::{borrow::Cow, fmt::Debug, marker::PhantomData, ops::Deref};
use async_trait::async_trait;
use futures::{future::BoxFuture, Future, FutureExt};
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use transmog::{Format, OwnedDeserializer};
use transmog_pot::Pot;
use super::names::InvalidNameError;
use c... | the_stack |
use crate::parse::Hex;
use std::fs::File;
use std::io;
use std::path::PathBuf;
use structopt::StructOpt;
/// Command-line options describing an input source, either from a file or
/// directly from the command line.
#[derive(Debug, StructOpt)]
pub struct InputSource {
#[structopt(
long = "bin-file",
... | the_stack |
use crate::builder::id::ShapeName;
use crate::builder::traits::ErrorSource;
use crate::builder::{traits, TopLevelShapeBuilder, TraitBuilder};
use crate::model::shapes::Simple;
use crate::model::{Identifier, ShapeID};
use crate::prelude::{
PRELUDE_NAMESPACE, SHAPE_BIGDECIMAL, SHAPE_BIGINTEGER, SHAPE_BLOB, SHAPE_BOOL... | the_stack |
use super::{Header, RegisteredHeader, Secret};
use crate::errors::{Error, ValidationError};
use crate::jwa::SignatureAlgorithm;
use crate::serde_custom;
use data_encoding::BASE64URL_NOPAD;
use serde::{de::DeserializeOwned, Deserialize, Deserializer, Serialize};
// Not using CompactPart::to_bytes here, bounds are overl... | the_stack |
extern crate chrono;
extern crate dirs;
extern crate flate2;
#[macro_use]
extern crate log;
extern crate log4rs;
#[cfg(target_os = "windows")]
use std::os::windows::process::CommandExt;
use anyhow::{anyhow, Result};
use base::{
chipmunk_home_dir, chipmunk_log_config, initialize_from_fresh_yml, setup_fallback_logg... | the_stack |
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![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... | the_stack |
use std::cmp;
/// Iterator that produces non-overlapping integer vectors.
/// This is similar to `Vec::chunks` except it does not require a complete vector of integers to produce chunks
pub struct VecChunkIter<Idx> {
inner: NonOverlappingIntegerPairIter<Idx>,
}
impl<Idx: PartialOrd + Copy> VecChunkIter<Idx> {
... | the_stack |
//! Map Cdt Aerospike Filter Expressions.
use crate::expressions::{nil, ExpOp, ExpType, ExpressionArgument, FilterExpression, MODIFY};
use crate::operations::cdt_context::{CdtContext, CtxType};
use crate::operations::maps::{map_write_op, CdtMapOpType};
use crate::{MapPolicy, MapReturnType, Value};
#[doc(hidden)]
const... | the_stack |
extern crate alloc;
extern crate bit_field;
extern crate log;
extern crate spin;
use crate::cpu;
use crate::cpu::io::Port;
use crate::system::timer::{wait_ns, Time};
use bit_field::BitField;
use core::iter::Iterator;
use alloc::{string::String, vec::Vec};
use spin::Mutex;
use lazy_static::lazy_static;
/// ATA soft... | the_stack |
mod dynamic_bindings;
#[cfg(feature = "static_bindings")]
extern crate deepspeech_sys;
#[cfg(feature = "dynamic")]
extern crate libloading;
extern crate libc;
#[cfg(any(feature = "static_bindings", feature = "dynamic"))]
pub mod errors;
#[cfg(any(feature = "static_bindings", feature = "dynamic"))]
use errors::Deepsp... | the_stack |
use std::result;
pub type Result<T> = result::Result<T, Exception>;
use interrupts::{AutoInterruptController, InterruptController, SPURIOUS_INTERRUPT};
use ram::loggingmem::{LoggingMem, OpsLogger};
pub type TestCore = ConfiguredCore<AutoInterruptController, LoggingMem<OpsLogger>>;
pub type Handler<T> = fn(&mut T) -> Re... | the_stack |
use std::borrow::Cow;
use std::fmt;
use ::actix::prelude::*;
use actix_web::error::ResponseError;
use actix_web::http::header::HeaderValue;
use actix_web::http::{header, header::HeaderName, uri::PathAndQuery, StatusCode};
use actix_web::http::{HeaderMap, Method};
use actix_web::{AsyncResponder, Error, HttpMessage, Htt... | the_stack |
#![no_std]
extern crate memory;
extern crate sdt;
extern crate acpi_table;
extern crate zerocopy;
#[macro_use] extern crate static_assertions;
use core::mem::size_of;
use memory::{PhysicalAddress, MappedPages};
use sdt::Sdt;
use acpi_table::{AcpiSignature, AcpiTables};
use zerocopy::FromBytes;
mod drhd;
mod device_s... | the_stack |
use super::def::*;
use super::picman::*;
use super::plane::*;
use super::region::*;
use super::tbl::*;
use super::util::*;
use crate::api::frame::Aligned;
use num_traits::*;
/* padding for store intermediate values, which should be larger than
1+ half of filter tap */
const MC_IBUF_PAD_L: usize = 5;
const MC_IBUF_PAD... | the_stack |
use std::io;
use std::io::{Read, Write};
use std::net::TcpStream;
use std::net::Shutdown;
use http::HttpResult;
use http::frame::{FrameIR, RawFrame, unpack_header};
use http::connection::{SendFrame, ReceiveFrame, HttpFrame};
/// A trait that any struct that wants to provide the transport layer for
/// HTTP/2 needs to... | the_stack |
use ::keys::Address;
use chain::IndexedTransaction;
use constants::block_version::BlockVersion;
use log::debug;
use prost::Message;
use proto::chain::ContractType;
use proto::contract::TransferAssetContract;
use proto::state::Account;
use proto::ContractExt;
use state::keys;
use super::executor::actuators::asset::find... | the_stack |
use crate::datasource::{CatalogTable, HBeeTableDesc, HCombTable, HCombTableDesc};
use crate::error::{BuzzError, Result};
use crate::models::query::{BuzzStep, BuzzStepType};
use crate::not_impl_err;
use crate::plan_utils;
use crate::services::utils;
use datafusion::execution::context::ExecutionContext;
use datafusion::l... | the_stack |
use std::{collections::HashMap, mem::ManuallyDrop};
use crate::{
api::util::{mk_v8_string, v8_deserialize, v8_serialize},
exec::Executor,
};
use anyhow::Result;
use fraction::GenericFraction;
use itertools::Itertools;
use serde::{Deserialize, Serialize};
use std::sync::mpsc;
use thiserror::Error;
use v8;
use z3::a... | the_stack |
use ghost_cell::GhostToken;
use super::{GhostNode, LinkedList};
#[cfg(feature = "experimental-ghost-cursor")]
use ghost_cell::GhostCursor;
#[cfg(feature = "experimental-ghost-cursor")]
use super::Node;
/// A Cursor over the LinkedList.
pub struct Cursor<'a, 'brand, T> {
token: &'a GhostToken<'brand>,
node: ... | the_stack |
pub mod on_unimplemented;
pub mod suggestions;
use super::{
EvaluationResult, FulfillmentError, FulfillmentErrorCode, MismatchedProjectionTypes,
Obligation, ObligationCause, ObligationCauseCode, OnUnimplementedDirective,
OnUnimplementedNote, OutputTypeParameterMismatch, Overflow, PredicateObligation,
S... | the_stack |
use core::convert::TryInto;
use embedded_time::rate::Extensions;
use void::Void;
use crate::{
hal::timer::{self, Cancel as _},
pac,
pwr::PWR,
rcc::Rcc,
};
#[doc(no_inline)]
pub use rtcc::{Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike};
/// Errors that can occur when dealing with the RTC.
#... | the_stack |
//! gfxstream: Handles 3D virtio-gpu hypercalls using gfxstream.
//!
//! External code found at https://android.googlesource.com/device/generic/vulkan-cereal/.
#![cfg(feature = "gfxstream")]
use std::cell::RefCell;
use std::mem::{size_of, transmute};
use std::os::raw::{c_char, c_int, c_uint, c_void};
use std::ptr::nu... | the_stack |
use molasses::{
application::{decrypt_application_message, encrypt_application_message, ApplicationMessage},
credential::{BasicCredential, Credential, Identity},
crypto::{
ciphersuite::{CipherSuite, X25519_SHA256_AES128GCM},
sig::{SigPublicKey, SigSecretKey, SignatureScheme, ED25519_IMPL},
... | the_stack |
use crate::prelude::*;
use ensogl::display::traits::*;
use enso_frp as frp;
use enso_frp;
use ensogl::animation::hysteretic::HystereticAnimation;
use ensogl::application::Application;
use ensogl::data::color;
use ensogl::display;
use ensogl::display::shape::StyleWatch;
use ensogl::display::shape::StyleWatchFrp;
use e... | the_stack |
use std::collections::HashSet;
use std::env;
use std::error::Error;
use std::fs;
use std::fs::File;
use std::io;
use std::io::BufWriter;
use std::io::ErrorKind;
use std::io::Write;
use std::path::Path;
use std::result::Result;
use tensorflow_op_codegen::parser;
use tensorflow_op_codegen::protos::OpDef;
#[derive(Clone)... | the_stack |
#[macro_use]
extern crate rs_tracing;
use josh::JoshError;
use std::fs::read_to_string;
use std::io::Write;
fn run_filter(args: Vec<String>) -> josh::JoshResult<i32> {
let app = clap::App::new("josh-filter");
#[cfg(feature = "search")]
let app = {
app.arg(
clap::Arg::with_name("search... | the_stack |
#![allow(clippy::op_ref)]
use num::{One, Zero};
use std::ops::{Div, DivAssign, Index, IndexMut, Mul, MulAssign};
use simba::scalar::{ClosedAdd, ClosedMul, RealField, SubsetOf};
use crate::base::allocator::Allocator;
use crate::base::dimension::{DimNameAdd, DimNameSum, U1};
use crate::base::{Const, DefaultAllocator, ... | the_stack |
use crate::{ctx::*, DekuError, DekuRead, DekuWrite};
use bitvec::prelude::*;
use std::collections::HashSet;
use std::hash::{BuildHasher, Hash};
/// Read `T`s into a hashset until a given predicate returns true
/// * `capacity` - an optional capacity to pre-allocate the hashset with
/// * `ctx` - The context required b... | the_stack |
use std::collections::HashMap;
use std::iter::FromIterator;
use std::net::SocketAddr;
use std::pin::Pin;
use std::str::FromStr;
use std::sync::atomic::Ordering;
use std::task::{Context, Poll};
use bytes::{buf::BufMutExt, BytesMut};
use futures3::future::{ok, Future};
use slog::{info, o, warn, Logger};
use hyper13::se... | the_stack |
use std::{path::Path, sync::Arc, time::Duration};
use rand::rngs::OsRng;
use tari_common::configuration::Network;
use tari_comms::{
peer_manager::{NodeIdentity, PeerFeatures},
protocol::messaging::MessagingEventSender,
transports::MemoryTransport,
CommsNode,
};
use tari_comms_dht::{outbound::OutboundMe... | the_stack |
use super::super::{Collectable, Collector, CollectorConfig, Schedule, Status};
use super::TwampSenderOut;
use crate::config::ZkConfigCollector;
use crate::error::AgentError;
use crate::proto::connection::Connection;
use crate::proto::frame::{FrameReader, FrameWriter};
use crate::proto::pktmodel::{GetPacket, PacketModel... | the_stack |
use std::cell::Ref;
use std::collections::HashMap;
use std::rc::Rc;
use ga::{self, Array, Tensor, TensorMode};
use rand;
use super::init::Initializer;
use super::op::{OpBuilder, OpDescriptor, Operation};
use super::var_store::{VarIndex, VarStore};
#[derive(Copy, Clone)]
pub enum NodeInput {
Var(VarIndex), // ... | the_stack |
use std::fmt::Debug;
use std::io::SeekFrom;
use std::pin::Pin;
use std::time::{SystemTime, UNIX_EPOCH};
use futures::{future, Future, Stream, TryFutureExt};
use http::StatusCode;
use crate::davpath::DavPath;
macro_rules! notimplemented {
($method:expr) => {
Err(FsError::NotImplemented)
};
}
macro_ru... | the_stack |
use super::catalog::{chunk::ChunkStage, table::TableSchemaUpsertHandle, Catalog};
use iox_object_store::{IoxObjectStore, ParquetFilePath};
use observability_deps::tracing::{error, info};
use parquet_catalog::{
core::{PreservedCatalog, PreservedCatalogConfig},
interface::{
CatalogParquetInfo, CatalogStat... | the_stack |
use serde_json;
use serde_json::Value;
use openssl;
use openssl::bn::{BigNum, BigNumRef};
use settings;
use api::{VcxStateType, ProofStateType};
use messages;
use messages::proofs::proof_message::{ProofMessage, CredInfo};
use messages::{RemoteMessageType, GeneralMessage};
use messages::payload::{Payloads, PayloadKinds... | the_stack |
use super::super::{
constants::LEVEL_SEED,
engine::{chunk::Chunk, registry::Registry, world::WorldConfig},
gen::builder::VoxelUpdate,
};
use super::biomes::{get_biome_config, BiomeConfig, Biomes, CAVE_SCALE};
use log::debug;
use server_common::{
noise::{Noise, NoiseConfig},
vec::Vec3,
};
pub stru... | the_stack |
use futures::future;
use futures::prelude::*;
use futures::sync::oneshot;
use http::StatusCode;
use hyper::body::Payload;
use hyper::server::conn::AddrIncoming;
use hyper::service::Service;
use hyper::{Body, Request, Response, Server};
use hyperx::header::{ContentLength, ContentType};
use serde::Serialize;
use std::col... | the_stack |
use alloc::{string::String, vec::Vec};
use parity_wasm::elements::{BlockType, FuncBody, Instruction};
use crate::isa;
use validation::{
func::{
require_label,
top_label,
BlockFrame,
FunctionValidationContext,
StackValueType,
StartedWith,
},
stack::StackWithL... | the_stack |
extern crate argparse;
extern crate humantime;
extern crate fern;
extern crate libc;
extern crate libcantal;
extern crate lithos;
extern crate nix;
extern crate quire;
extern crate regex;
extern crate scan_dir;
extern crate serde_json;
extern crate signal;
extern crate syslog;
extern crate unshare;
#[macro_use] extern ... | the_stack |
//! An interface for interacting with the `fuchsia.bluetooth.bredr.Profile` protocol.
//! This interface provides convenience methods to register service searches and advertisements
//! using the `Profile` protocol and includes a Stream implementation which can be polled to
//! receive Profile API updates.
//!
//! ### ... | the_stack |
use std::ops::Deref;
use std::sync::Arc;
use std::time::Duration;
use async_trait::async_trait;
use futures::{
future::{BoxFuture, FutureExt},
stream::{BoxStream, StreamExt},
};
use parking_lot::RwLock;
use block::{
Block, BlockHeader, MacroBlock, MacroBody, MacroHeader, MultiSignature,
SignedTendermi... | the_stack |
use std::path::PathBuf;
use std::process::Command;
/// Our test blender file has 3 objects - a camera, mesh and armature
/// Here we ensure that after we run the script there are 5 objects,
/// since our script generates a new mesh and armature
#[test]
fn creates_seconds_armature() {
assert_num_objects_after_conve... | the_stack |
* Test cases for API handler functions that use pagination.
*/
use chrono::DateTime;
use chrono::Utc;
use dropshot::endpoint;
use dropshot::test_util::iter_collection;
use dropshot::test_util::object_get;
use dropshot::test_util::objects_list_page;
use dropshot::test_util::ClientTestContext;
use dropshot::test_util::... | the_stack |
mod capture;
mod game;
mod menu;
mod trace;
use std::{
cell::{Ref, RefCell, RefMut},
fs::File,
io::{Cursor, Read, Write},
net::SocketAddr,
path::{Path, PathBuf},
process::exit,
rc::Rc,
};
use game::Game;
use chrono::Duration;
use common::net::ServerCmd;
use richter::{
client::{
... | the_stack |
use futures::FutureExt;
use futures::{stream::FuturesUnordered, StreamExt};
use futures_channel::mpsc::{UnboundedReceiver, UnboundedSender};
use futures_timer::Delay;
use futures_util::select;
use js_sys::Reflect;
use log::{debug, error, warn};
use serde::Serialize;
use std::collections::HashMap;
use std::time::Duratio... | the_stack |
use std::collections::HashSet;
use std::ops::Deref;
use std::sync::atomic::{self, AtomicUsize};
use timely::dataflow::scopes::child::Iterative;
use timely::dataflow::Scope;
use timely::progress::Timestamp;
use differential_dataflow::lattice::Lattice;
use crate::binding::{AsBinding, AttributeBinding, Binding};
use cr... | the_stack |
extern crate iron;
extern crate matrix_rocketchat;
extern crate matrix_rocketchat_test;
extern crate router;
extern crate ruma_client_api;
extern crate ruma_events;
extern crate ruma_identifiers;
use std::convert::TryFrom;
use iron::{status, Chain};
use matrix_rocketchat::api::rocketchat::v1::USERS_INFO_PATH;
use mat... | the_stack |
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use uuid::Uuid;
const DATA_SIZES: [usize; 4] = [1, 7, 100, 10000];
pub fn load_usize_data(data_size: usize) -> Vec<usize> {
let mut v: Vec<usize> = Vec::with_capacity(data_size);
for i in 0.... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Type {
/// <p>The type name.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The type description.</p>
pub description: std::option::Option<std::string::String>,
/// <p>The type Amazon Resource Name (ARN).<... | the_stack |
use alloc::sync::Arc;
use ::qlib::mutex::*;
use core::ops::Deref;
use super::super::super::qlib::common::*;
use super::super::super::qlib::linux_def::*;
use super::super::super::qlib::linux::time::*;
use super::super::super::SignalDef::*;
use super::super::super::task::*;
use super::super::super::threadmgr::thread_gro... | the_stack |
use std::fmt;
use std::iter::FromIterator;
use heph_http::head::header::{FromHeaderValue, Header, HeaderName, Headers};
use crate::assert_size;
#[test]
fn sizes() {
assert_size::<Headers>(48);
assert_size::<Header>(48);
assert_size::<HeaderName<'static>>(32);
}
#[test]
fn headers_append_one_header() {
... | the_stack |
use std::os::raw::c_void;
use std::os::windows::io::RawHandle;
use std::{io, mem, ptr};
type BOOL = i32;
type WORD = u16;
type DWORD = u32;
type WCHAR = u16;
type HANDLE = *mut c_void;
type LPHANDLE = *mut HANDLE;
type LPVOID = *mut c_void;
type LPCVOID = *const c_void;
type ULONG_PTR = usize;
type SIZE_T = ULONG_PTR;... | the_stack |
use super::{Connection, Either};
use serde::{de::DeserializeOwned, Serialize};
use std::{
collections::hash_map::DefaultHasher, hash::{Hash, Hasher}, net::SocketAddr
};
use tcp_typed::Notifier;
/// Used to determine which side should be connecter/client and which connectee/server/listener.
fn ord(a: &SocketAddr, b: &... | the_stack |
use super::gdb_command_handler::GdbCommandHandler;
use crate::{
commands::gdb_server::{Checkpoint, ExplicitCheckpoint, GdbServer},
replay_timeline::Mark,
session::task::Task,
};
use std::{
collections::HashMap,
ffi::{OsStr, OsString},
io::Write,
ops::{Deref, DerefMut},
os::unix::ffi::{Os... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.