text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
mod fixture;
use bstr::ByteSlice;
use git_stack::graph::*;
mod test_rebase {
use super::*;
#[test]
fn no_op() {
let mut repo = git_stack::git::InMemoryRepo::new();
let plan =
git_fixture::Dag::load(std::path::Path::new("tests/fixtures/branches.yml")).unwrap();
fixture... | the_stack |
use anyhow::Context;
use rusqlite::Transaction;
use stark_hash::{stark_hash, StarkHash};
use crate::{
core::{ClassHash, ContractRoot, ContractStateHash},
ethereum::state_update::ContractUpdate,
state::state_tree::{ContractsStateTree, GlobalStateTree},
storage::{ContractsStateTable, ContractsTable},
};
... | the_stack |
//! Transformations of SQL IR, before decorrelation.
use std::collections::BTreeMap;
use std::mem;
use lazy_static::lazy_static;
use expr::func;
use repr::{ColumnType, RelationType, ScalarType};
use crate::plan::expr::{
AbstractExpr, AggregateFunc, BinaryFunc, HirRelationExpr, HirScalarExpr, UnaryFunc,
};
/// ... | the_stack |
use dioxus_core::*;
use std::fmt::Arguments;
macro_rules! no_namespace_trait_methods {
(
$(
$(#[$attr:meta])*
$name:ident;
)*
) => {
$(
$(#[$attr])*
fn $name<'a>(&self, cx: NodeFactory<'a>, val: Arguments) -> Attribute<'a> {
... | the_stack |
use std::{borrow::Cow, cmp::min, convert::TryFrom, io};
use bitvec::prelude::*;
use byteorder::ReadBytesExt;
use saturating::Saturating as S;
use crate::{
binlog::{
consts::{BinlogVersion, EventType, OptionalMetadataFieldType},
BinlogCtx, BinlogEvent, BinlogStruct,
},
constants::{ColumnTyp... | the_stack |
use std::sync::Arc;
use async_trait::async_trait;
use displaydoc::Display;
use thiserror::Error;
use tracing::info;
use crate::{
state_machine::{
events::DictionaryUpdate,
phases::{Handler, Phase, PhaseError, PhaseName, PhaseState, Shared, Update},
requests::{RequestError, StateMachineRequ... | the_stack |
use std::borrow::Cow::Borrowed;
use std::borrow::{Borrow, Cow};
use std::cell::{Cell, RefCell};
use std::rc::Rc;
use crate::char_stream::{CharStream, InputData};
use crate::error_listener::{ConsoleErrorListener, ErrorListener};
use crate::errors::ANTLRError;
use crate::int_stream::IntStream;
use crate::lexer_atn_simu... | the_stack |
use core::sync::atomic::Ordering;
use ::qlib::mutex::*;
use alloc::sync::Arc;
use alloc::vec::Vec;
use core::ops::Deref;
use super::super::asm::*;
use super::super::qlib::limits::*;
use super::super::threadmgr::thread_group::*;
use super::super::threadmgr::thread::*;
use super::super::qlib::usage::cpu::*;
use super::s... | the_stack |
use std::collections::BTreeMap;
use std::fmt::Debug;
use std::io::Cursor;
use std::ops::RangeBounds;
use std::sync::Arc;
use std::sync::Mutex;
use openraft::async_trait::async_trait;
use openraft::storage::LogState;
use openraft::storage::Snapshot;
use openraft::AnyError;
use openraft::EffectiveMembership;
use openraf... | the_stack |
pub use super::index::VerifierIndex as Index;
pub use super::prover::{range, ProverProof};
use crate::plonk_sponge::FrSponge;
use ark_ec::AffineCurve;
use ark_ff::{Field, One, PrimeField, Zero};
use ark_poly::{EvaluationDomain, Polynomial};
use commitment_dlog::commitment::{
b_poly, b_poly_coefficients, combined_in... | the_stack |
use anyhow::{anyhow, bail, Error};
use std::cmp;
use std::env;
use walrus::ir::Value;
use walrus::{ExportItem, GlobalId, GlobalKind, MemoryId, Module};
use walrus::{FunctionId, InitExpr, ValType};
use wasm_bindgen_wasm_conventions as wasm_conventions;
const PAGE_SIZE: u32 = 1 << 16;
/// Configuration for the transfor... | the_stack |
//-----------------------------------------------------------------------------
// Incredible - Include Scanner | Leon O'Reilly
//
// Retrieves all #includes from input file
// Resolved paths using supplied inclued directories
// Recurses through all includes and builds full list of dependents
// Resolves basic macros
... | the_stack |
use crate::{
bindings::{kernel::user_regs_struct, thread_db},
kernel_abi::SupportedArch,
log::LogDebug,
remote_ptr::{RemotePtr, Void},
session::task::TaskSharedPtr,
thread_group::ThreadGroup,
};
use libc::pid_t;
use std::{
collections::{BTreeMap, BTreeSet},
ffi::{c_void, CStr, OsStr, OsS... | the_stack |
use std::ptr;
use super::{ComInterface, HString, HStringReference, HStringArg, ComPtr, ComArray, ComIid, Guid, IUnknown};
use crate::HRESULT;
use w::shared::ntdef::{VOID, ULONG};
use w::shared::winerror::{S_OK, S_FALSE, CO_E_NOTINITIALIZED, REGDB_E_CLASSNOTREG};
use w::shared::guiddef::IID;
use w::winrt::hstring::HST... | the_stack |
use super::Dispatch;
use crate::{
widget::attribute::find_value, AttribKey, Attribute, Backend, Component,
Node, Widget,
};
use image::{bmp::BMPEncoder, ColorType, GenericImageView, ImageEncoder};
use native_windows_gui as nwg;
use nwg::{
Bitmap, Button, CheckBox, FlexboxLayout, ImageFrame, Label, RadioButt... | the_stack |
use std::{cell::RefCell, convert::TryInto, mem::drop, num::NonZeroU64, rc::Rc};
use accesskit::kurbo::Rect;
use accesskit::{
Action, ActionHandler, ActionRequest, DefaultActionVerb, Node, NodeId, Role, StringEncoding,
Tree, TreeId, TreeUpdate,
};
use lazy_static::lazy_static;
use windows::{
core::*,
Wi... | the_stack |
clippy::module_name_repetitions,
clippy::must_use_candidate,
clippy::cast_sign_loss,
clippy::empty_enum,
clippy::used_underscore_binding,
clippy::redundant_static_lifetimes,
clippy::redundant_field_names,
unused_imports
)]
// automatically generated by the FlatBuffers compiler, do not modify... | the_stack |
#![deny(unsafe_code)]
#![deny(missing_docs)]
//! Ammonia is a whitelist-based HTML sanitization library. It is designed to
//! prevent cross-site scripting, layout breaking, and clickjacking caused
//! by untrusted user-provided HTML being mixed into a larger web page.
//!
//! Ammonia uses [html5ever] to parse and ser... | the_stack |
use nom::branch::alt;
use nom::character::complete::{alphanumeric1, digit1, line_ending, multispace0, multispace1};
use nom::character::is_alphanumeric;
use nom::combinator::{map, not, peek};
use nom::{IResult, InputLength, Parser};
use std::fmt::{self, Display};
use std::str;
use std::str::FromStr;
use arithmetic::{a... | the_stack |
use crate::prelude::{sext, InsnT, RegT, XLen};
use crate::processor::{HasCsr, ProcessorCfg, ProcessorState};
use num_enum::{IntoPrimitive, TryFromPrimitive};
use std::cell::RefCell;
use std::convert::TryFrom;
use std::rc::Rc;
use terminus_spaceport::irq::IrqVec;
mod m;
pub use m::csrs::*;
pub use m::PrivM;
mod s;
p... | the_stack |
mutable_transmutes,
non_camel_case_types,
non_snake_case,
non_upper_case_globals
)]
use std::ptr;
use super::dpx_sfnt::{
dfont_open, sfnt_create_FontFile_stream, sfnt_find_table_pos, sfnt_open,
sfnt_read_table_directory, sfnt_require_table,
};
use crate::dpx_truetype::SfntTableInfo;
use crate::{in... | the_stack |
//! Library for a poll coordinator.
use curve25519_dalek::{ristretto::RistrettoPoint, scalar::Scalar};
use wedpr_l_crypto_zkp_utils::{bytes_to_point, point_to_bytes, BASEPOINT_G1};
use wedpr_l_utils::{
error::WedprError,
traits::{Hash, Signature},
};
use wedpr_s_protos::generated::acv::{
Ballot, Candidate... | the_stack |
//! A layer between raw [`Runtime`] webview windows and Tauri.
use crate::{
http::{Request as HttpRequest, Response as HttpResponse},
menu::{Menu, MenuEntry, MenuHash, MenuId},
webview::{WebviewAttributes, WebviewIpcHandler},
Dispatch, Runtime, UserEvent, WindowBuilder,
};
use serde::{Deserialize, Deserializer... | the_stack |
use std::cell::RefCell;
use weasel::ability::ActivateAbility;
use weasel::actor::{Action, Actor, ActorRules};
use weasel::battle::{BattleController, BattleRules, BattleState};
use weasel::creature::{ConvertCreature, CreateCreature, RemoveCreature};
use weasel::entity::EntityId;
use weasel::entropy::Entropy;
use weasel:... | the_stack |
use ctypes::{c_int, c_uchar, c_uint, c_ulong, c_ushort, c_void, wchar_t};
use shared::guiddef::GUID;
use shared::minwindef::DWORD;
use shared::rpc::{I_RPC_HANDLE, RPC_STATUS};
pub type RPC_CSTR = *mut c_uchar;
pub type RPC_WSTR = *mut wchar_t;
pub type RPC_CWSTR = *const wchar_t;
pub type RPC_BINDING_HANDLE = I_RPC_HAN... | the_stack |
mod common;
use std::fs::File;
use std::io::{self, BufReader, Cursor};
use std::path::Path;
use std::process::{Command, Stdio};
use assert_cmd::cargo::CommandCargoExt;
use inferno::collapse::perf::{Folder, Options};
use log::Level;
use pretty_assertions::assert_eq;
use testing_logger::CapturedLog;
fn test_collapse_p... | the_stack |
mod component;
use std::collections::HashMap;
use std::iter;
use std::ops::Deref;
use itertools::Itertools;
use regex::Regex;
use rustc::hir;
use rustc::hir::def::CtorKind;
use rustc::hir::def_id::DefId;
use rustc::mir::*;
use rustc::middle::const_val::ConstVal;
use rustc::traits;
use rustc::ty::{self, Ty};
use rust... | the_stack |
use analysis::{self, DefKind};
use slog::Logger;
use std::collections::{HashSet, VecDeque};
use std::fs::{self, File};
use std::io::prelude::*;
use std::path::PathBuf;
use error;
use cargo::{self, Target};
use Config;
use Result;
use strip_leading_space;
pub fn create(config: &Config, log: &Logger) -> Result<HashSet... | the_stack |
use std::fmt::{Debug, Formatter};
use std::hash::Hash;
use std::ptr;
use std::{collections::HashMap, mem::MaybeUninit};
/// Similar to InlineVec, this structure will use an array
/// if it is small enough to live on the stack, otherwise
/// it allocates a HashMap on the heap
///
/// Hashing can be slower than just ite... | the_stack |
use plotly::common::{TickFormatStop, Title};
use plotly::layout::{Axis, RangeSelector, RangeSlider, SelectorButton, SelectorStep, StepMode};
use plotly::{Candlestick, Layout, Ohlc, Plot, Scatter};
use serde::Deserialize;
use std::env;
use std::path::PathBuf;
#[derive(Deserialize)]
#[allow(dead_code)]
struct FinData {
... | the_stack |
use crate::accessor::{Accessor, AccessorBuilder};
use crate::config::rule::Action as ConfigAction;
use crate::error::MatcherError;
use crate::model::{ActionMetaData, EnrichedValue, EnrichedValueContent, InternalEvent, ValueMetaData};
use std::collections::HashMap;
use serde_json::{Map, Number, Value};
use tornado_commo... | the_stack |
#![allow(deprecated)]
#![allow(dead_code)]
#![allow(clippy::all)]
#![allow(unused_imports)]
#![allow(unused_extern_crates)]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments, clippy::type_complexity))]
#![cfg_attr(rustfmt, rustfmt_skip)]
extern crate thrift;
use thrift::OrderedFloat;
use std::cel... | the_stack |
use super::NumberingFormats;
use super::Fonts;
use super::Fills;
use super::BordersCrate;
use super::CellStyleFormats;
use super::CellFormats;
use super::CellFormat;
use super::CellStyles;
use super::DifferentialFormats;
use super::Colors;
use super::Style;
use writer::driver::*;
use quick_xml::Reader;
use quick_xml::e... | the_stack |
use ::lib::byteorder::{ReadBytesExt,ByteOrder,BigEndian};
/// FDT parser/decoder structure
pub struct FDTRoot<'a>
{
buffer: &'a [u8],
}
#[derive(Debug)]
enum Tag<'a>
{
BeginNode(&'a str),
EndNode,
Prop(&'a str, &'a [u8]),
Nop,
End,
}
fn align_to_tag(v: usize) -> usize {
(v + 4-1) & !(4-1)
}
impl<'a> FDTRoot<... | the_stack |
use whitebox_raster::*;
use crate::tools::*;
use num_cpus;
use std::env;
use std::f64;
use std::io::{Error, ErrorKind};
use std::path;
use std::sync::mpsc;
use std::sync::Arc;
use std::thread;
/// This tool calculates the sediment transport index, or sometimes, length-slope (*LS*)
/// factor, based on input specific c... | the_stack |
clippy::too_many_lines,
clippy::cast_possible_wrap,
clippy::cast_sign_loss
)]
use arrow::{
array::{self, Array, ArrayRef},
datatypes::{self, ArrowNativeType, ArrowNumericType, ArrowPrimitiveType, DataType},
};
use serde_json::value::Value;
use super::{batch_conversion::col_to_json_vals, prelude::*};
u... | the_stack |
// There are different kinds of walks. Here are the major ones Unseemly needs so far:
//
// Evaluation produces a `Value` or an error.
// During evaluation, each `lambda` form may be processed many times,
// with different values for its parameters.
//
// Typechecking produces `Ast` or an error.
// During typechecking... | the_stack |
//! Dummy implementation of `Fancy`.
//!
//! Useful for evaluating the circuits produced by `Fancy` without actually
//! creating any circuits.
use crate::{
errors::{DummyError, FancyError},
fancy::{Fancy, FancyInput, FancyReveal, HasModulus},
};
/// Simple struct that performs the fancy computation over `u16... | the_stack |
use std::convert::From;
use std::ffi::{CStr, CString};
use crate::edge::*;
use crate::list::*;
use crate::map::*;
use crate::memgraph::*;
use crate::mgp::*;
use crate::path::*;
use crate::result::*;
use crate::temporal;
use crate::vertex::*;
use chrono::{NaiveDate, NaiveDateTime, NaiveTime};
// Required here, if not p... | the_stack |
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use super::scope::Scope;
use super::{Closable, RecursionTracker, TypeError, TypeResult};
lazy_static! {
static ref UID: AtomicUsize = AtomicUsize::new(0);
}
/// Returns an ID that is guaranteed to be uniq... | the_stack |
use crate::{ffi::E_FAIL, profiler::types::Integration};
use com::sys::HRESULT;
use log::LevelFilter;
use log4rs::{
append::{
console::ConsoleAppender,
rolling_file::{
policy::compound::{
roll::fixed_window::FixedWindowRoller, trigger::size::SizeTrigger, CompoundPolicy,
... | the_stack |
use crate::help;
use crate::node::*;
use crate::t_eprint;
use crate::trie::{
hyf_distance, hyf_next, hyf_num, hyph_start, init_trie, max_hyph_char, op_start,
trie_not_ready, trie_trc, trie_trl, trie_tro, MIN_TRIE_OP,
};
use crate::xetex_consts::*;
use crate::xetex_errors::{confusion, error};
use crate::xetex_in... | the_stack |
use crate::{
pallet::{self, Config, Error},
types::*,
};
use frame_support::{
dispatch::{DispatchError, DispatchResult},
ensure,
};
use orml_traits::{MultiCurrency, MultiReservableCurrency};
use primitives::TruncateFixedPointToInt;
use sp_runtime::{
traits::{CheckedAdd, CheckedDiv, CheckedMul, Chec... | the_stack |
// Those files contain the following copyright notice:
// Unicode Character Database
// Date: 2019-03-01, 22:17:00 GMT [KW]
// © 2019 Unicode®, Inc.
// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
// For terms of use, see http://www.unicode.org/terms_of_use.h... | the_stack |
use crate::graph;
use crate::module_context::*;
use typed_arena::Arena;
use std::collections::HashMap;
pub(super) struct Register<'a> {
pub data: &'a graph::RegisterData<'a>,
pub value_name: String,
pub next_name: String,
}
pub(super) struct Mem<'a> {
pub mem: &'a graph::Mem<'a>,
pub mem_name: S... | the_stack |
use std::cmp::min;
use log::error;
use beserial::{Deserialize, Serialize};
use nimiq_bls::CompressedPublicKey as BlsPublicKey;
use nimiq_database::WriteTransaction;
use nimiq_hash::Blake2bHash;
use nimiq_keys::Address;
use nimiq_primitives::coin::Coin;
use nimiq_primitives::policy;
use crate::staking_contract::recei... | the_stack |
use crate::{packet::number::PacketNumberSpace, time::Timestamp};
use core::{
cmp::{max, min},
time::Duration,
};
//= https://www.rfc-editor.org/rfc/rfc9002#section-6.2.2
//# When no previous RTT is available, the initial RTT
//# SHOULD be set to 333 milliseconds. This results in handshakes
//# starting with a... | the_stack |
use super::{ButtplugDeviceResultFuture, ButtplugProtocol, ButtplugProtocolCommandHandler};
use crate::{
core::messages::{
self,
ButtplugDeviceCommandMessageUnion,
ButtplugDeviceMessage,
DeviceMessageAttributesMap,
VibrateCmd,
VibrateSubcommand,
},
device::{
protocol::{generic_command_m... | the_stack |
#![warn(
clippy::doc_markdown,
clippy::redundant_closure,
clippy::explicit_iter_loop,
clippy::match_same_arms,
clippy::needless_borrow,
clippy::print_stdout,
clippy::integer_arithmetic,
clippy::cast_possible_truncation,
clippy::unwrap_used,
clippy::map_unwrap_or,
clippy::triv... | the_stack |
use jack_sys as j;
use std::marker::PhantomData;
use std::{mem, slice};
use crate::{Error, Frames, Port, PortFlags, PortSpec, ProcessScope};
/// Contains 8bit raw midi information along with a timestamp relative to the
/// process cycle.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct RawMidi<'a> {
/// Th... | the_stack |
#[cfg(feature = "serde")]
pub mod serde;
#[cfg(any(test, bench))]
pub mod utilities;
use bytecount::num_chars;
use std::{cmp::Ordering, error::Error, fmt, iter::FromIterator};
/// A single operation to be executed at the cursor's current position.
#[derive(Debug, Clone, PartialEq)]
pub enum Operation {
// Delete... | the_stack |
use bytes::BytesMut;
use cookie_factory::GenError;
use futures::{sink, stream::StreamFuture, try_ready, Async, Future, Poll, Sink, Stream};
use nom::{Err, Offset};
use std::iter::repeat;
use std::ops::AddAssign;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use tokio::{
codec::{Decoder, Encoder, Framed, Framed... | the_stack |
use crate::{
CreateTokenAuth, CreateTokenResponse, ExportKey, ExportKeyResponse, ListKeys, ListKeysResponse,
ListPoliciesResponse, ReadKey, ReadKeyResponse, ReadKeys, ReadSecretData, ReadSecretListData,
ReadSecretListResponse, ReadSecretMetadata, ReadSecretResponse, RenewTokenAuth,
RenewTokenResponse, S... | the_stack |
//! There are multiple [`Engine`](kv::Engine) implementations, [`RaftKv`](crate::server::raftkv::RaftKv)
//! is used by the [`Server`](crate::server::Server). The [`BTreeEngine`](kv::BTreeEngine) and
//! [`RocksEngine`](RocksEngine) are used for testing only.
#![feature(min_specialization)]
#![feature(generic_associat... | the_stack |
//! # Implemuntation of the functions in the ICU4C `ustring.h` header.
//!
//! This is where the UTF-8 strings get converted back and forth to the UChar
//! representation.
//!
use {
log::trace, rust_icu_common as common, rust_icu_sys as sys, rust_icu_sys::*,
std::convert::TryFrom, std::os::raw,
};
/// The im... | the_stack |
use std::{ mem, fmt };
use std::marker::PhantomData;
use std::ops::{Deref, DerefMut};
use std::rc::Rc;
use std::error::Error;
use crate::gl;
use crate::version::Version;
use crate::version::Api;
use crate::backend::Facade;
use crate::context::Context;
use crate::context::CommandContext;
use crate::ContextExt;
use crat... | the_stack |
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
use std::future::Future;
use std::marker::PhantomData;
use std::panic::{RefUnwindSafe, UnwindSafe};
use std::rc::Rc;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::{Arc, Mutex, RwLock};
use std::task::{Poll, Waker};
us... | the_stack |
use std::{
collections::HashMap,
fs::{self},
io::Cursor,
net::SocketAddr,
ops::Deref,
path::{Path, PathBuf},
sync::Arc,
};
use crate::disk::FilesystemLogger;
use bitcoin::secp256k1::PublicKey;
use bitcoin::{
blockdata::constants::genesis_block, hashes::hex::FromHex, BlockHash, Network, ... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateChannelOutput {
/// <p>Object specifying a channel.</p>
pub channel: std::option::Option<crate::model::Channel>,
}
impl UpdateChannelOutput {
/// <p>Object specifying... | the_stack |
extern crate eetf;
extern crate num;
use eetf::convert::TryInto;
use eetf::*;
use std::convert::TryFrom;
use std::io::Cursor;
#[test]
fn atom_test() {
// Display
assert_eq!("'foo'", Atom::from("foo").to_string());
assert_eq!(r#"'fo\'o'"#, Atom::from(r#"fo'o"#).to_string());
assert_eq!(r#"'fo\\o'"#, At... | the_stack |
use std::collections::HashMap;
use std::fmt;
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use std::sync::Arc;
use encryption::{DataKeyManager, EncrypterWriter};
use engine_rocks::{get_env, RocksSstReader};
use engine_traits::{EncryptionKeyManager, KvEngine, SSTMetaInfo, SstReader};
use file_system::{get... | the_stack |
use std::{convert::TryInto, ffi::c_void, fmt::Debug, ptr};
use crate::{
binary::Pack,
boxed::ZBox,
convert::{FromZval, FromZvalMut, IntoZval, IntoZvalDyn},
error::{Error, Result},
ffi::{
_zval_struct__bindgen_ty_1, _zval_struct__bindgen_ty_2, zend_is_callable, zend_resource,
zend_va... | the_stack |
bad_style,
unused,
unused_extern_crates,
unused_import_braces,
unused_qualifications,
unused_results
)]
use color_eyre::{
eyre::{bail, eyre, Error, Result, WrapErr as _},
owo_colors::OwoColorize as _,
};
use oauth_client::Token;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
u... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationExceptionField {
/// <p>The name of the parameter that failed validation.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The message describing why the parameter failed validation.</p>
pub message: s... | the_stack |
//! Analysis which computes information needed in backends for monomorphization. This
//! computes the distinct type instantiations in the model for structs and inlined functions.
//! It also eliminates type quantification (`forall coin_type: type:: P`).
use std::{
collections::{BTreeMap, BTreeSet},
fmt,
r... | the_stack |
#![warn(missing_docs)]
//! Simple library for getting the version information of a `rustc`
//! compiler.
//!
//! This can be used by build scripts or other tools dealing with Rust sources
//! to make decisions based on the version of the compiler.
//!
//! It calls `$RUSTC --version -v` and parses the output, falling
/... | the_stack |
use super::*;
use util::{compute_hash160, hmac_sign, sha2_hash_to_slice};
use bindings::{cb_receive, cb_send, load_circuit_file, ConnType};
use channels_util::{
ChannelStatus, FundingTxInfo, NegativePaymentPolicy, PaymentStatus, ProtocolStatus,
};
use database::{MaskedMPCInputs, MaskedTxMPCInputs, SessionState, St... | the_stack |
// TODO: use a real logging framework
macro_rules! log {
($($e:expr),*) => {
// print!( $($e),* );
};
}
macro_rules! icp {
() => {
panic!("ICP: can't happen")
};
( $($arg:expr),* ) => {
panic!("ICP: {}", format!( $($arg),* ) )
};
}
// Assoc
macro_rules! expr_ify {
... | the_stack |
#![cfg(any(target_arch = "arm", target_arch = "aarch64"))]
use std::collections::BTreeMap;
use std::io;
use std::sync::Arc;
use arch::{
get_serial_cmdline, GetSerialCmdlineError, MsrExitHandler, RunnableLinuxVm, VmComponents,
VmImage,
};
use base::{Event, MemoryMappingBuilder};
use devices::serial_device::{Se... | the_stack |
use crate::error::{
COPY_DIR_ERROR, COPY_FILE_ERROR, CREATE_DIR_ERROR, CREATE_SYMLINK_ERROR, FILE_NOT_EXISTS_ERROR,
INCORRECT_HASH_ERROR,
};
use data_encoding::HEXUPPER;
use elf::types::{ET_DYN, ET_EXEC, Type};
use regex::Regex;
use sha2::{Digest, Sha256};
use std::collections::{HashMap, HashSet};
use std::pat... | the_stack |
extern crate rand;
use rand::rngs::OsRng;
use rand::thread_rng;
#[macro_use]
extern crate criterion;
use criterion::measurement::Measurement;
use criterion::BatchSize;
use criterion::Criterion;
use criterion::{BenchmarkGroup, BenchmarkId};
extern crate curve25519_dalek;
use curve25519_dalek::constants;
use curve255... | the_stack |
use crate::voice::VoiceState;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct VoiceStateUpdate(pub VoiceState);
#[cfg(test)]
mod tests {
use super::{VoiceState, VoiceStateUpdate};
use crate::{
datetime::{Timestamp, TimestampParseErro... | the_stack |
use stdweb::{Reference, ReferenceType, Value};
use stdweb_derive::ReferenceType;
use crate::{
constants::{ResourceType, ReturnCode, StructureType},
local::{ObjectId, Position, RawObjectId},
traits::{IntoExpectedType, TryFrom, TryInto},
ConversionError,
};
mod creep_shared;
mod impls;
mod structure;
p... | the_stack |
// This file was auto-generated from spec/tests/yaml/swiftnav/sbp/tracking/test_MsgMeasurementState.yaml by generate.py. Do not modify by hand!
use crate::*;
#[test]
fn test_auto_check_sbp_tracking_msg_measurement_state() {
{
let mut payload = Cursor::new(vec![
85, 97, 0, 207, 121, 237, 29, 0,... | the_stack |
use crate::bytes_ext::{BytesExt, BytesMutExt};
use crate::mctypes::{EntityMetaRead, EntityMetaWrite, McTypeRead, McTypeWrite};
use crate::packet::{AsAny, PacketBuilder};
use crate::{Packet, PacketType};
use ahash::AHashMap;
use bytes::{Buf, BufMut, BytesMut};
use feather_blocks::{FacingCardinal, FacingCardinalAndDown, ... | the_stack |
//! TSIG for secret key authentication of transaction
use std::convert::TryInto;
use std::fmt;
#[cfg(feature = "serde-config")]
use serde::{Deserialize, Serialize};
use crate::rr::rdata::sshfp;
use crate::error::*;
use crate::op::{Header, Message, Query};
use crate::rr::dns_class::DNSClass;
use crate::rr::dnssec::rd... | the_stack |
use crate::{
core::{algebra::Vector2, pool::Handle},
define_constructor,
grid::{Column, GridBuilder, Row},
message::{MessageDirection, UiMessage},
scroll_bar::{ScrollBar, ScrollBarBuilder, ScrollBarMessage},
scroll_panel::{ScrollPanelBuilder, ScrollPanelMessage},
widget::{Widget, WidgetBuild... | the_stack |
pub mod combination;
pub mod equals;
pub mod every;
pub mod is;
pub mod is_empty;
pub mod is_set;
pub mod none;
pub mod some;
use query_engine_tests::*;
/// Basic to-many test data.
#[rustfmt::skip]
async fn create_to_many_test_data(runner: &Runner) -> TestResult<()> {
// A few with full data
create_row(runne... | the_stack |
pub struct DescribeProjectsPaginator<
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_projects_input::Builder,
}
impl<C, M, R> De... | the_stack |
extern crate ketos;
use ketos::{CompileError, Error, ExecError, Interpreter, FromValue, Value};
fn eval(s: &str) -> Result<String, Error> {
let interp = Interpreter::new();
let v = interp.run_single_expr(s, None)?;
Ok(interp.format_value(&v))
}
fn eval_str(s: &str) -> Result<String, Error> {
let int... | the_stack |
use crate::na::{DMatrix, DVector};
use whitebox_raster::*;
use whitebox_common::rendering::html::*;
use crate::tools::*;
use whitebox_vector::{FieldData, ShapeType, Shapefile};
use std::env;
use std::f64;
use std::fs::File;
use std::io::prelude::*;
use std::io::BufWriter;
use std::io::{Error, ErrorKind};
use std::path;... | the_stack |
use query_engine_tests::test_suite;
use std::borrow::Cow;
/// Note that if cache expiration tests fail, make sure `CLOSED_TX_CLEANUP` is set correctly (low value like 2) from the .envrc.
#[test_suite(schema(generic))]
mod interactive_tx {
use query_engine_tests::*;
use tokio::time;
#[connector_test]
a... | the_stack |
use cosmwasm_std::entry_point;
use crate::bid::{
execute_bid, query_bid, query_bids_by_collateral, query_bids_by_user, retract_bid, submit_bid,
};
use crate::error::ContractError;
use crate::state::{read_config, store_config, Config};
use cosmwasm_bignumber::{Decimal256, Uint256};
use cosmwasm_std::{
from_bin... | the_stack |
use crate::{
connection, endpoint, path, path::Path, space::PacketSpaceManager, transmission,
transmission::interest::Provider,
};
use core::time::Duration;
use s2n_codec::{Encoder, EncoderBuffer};
use s2n_quic_core::{
event::{self, ConnectionPublisher as _},
frame::ack_elicitation::AckElicitable,
i... | the_stack |
use std::collections::HashSet;
use crate::mir::ops;
use crate::mir::value::Value;
fn remove_unused_cond_ops(
cond_op: ops::CondOp,
used_regs: &mut HashSet<ops::RegId>,
) -> Option<ops::CondOp> {
let ops::CondOp {
reg_phi,
test_reg,
true_ops,
false_ops,
} = cond_op;
... | the_stack |
use ctypes::c_void;
use shared::basetsd::{UINT32, UINT64};
use shared::dxgi::{IDXGIDevice, IDXGISurface};
use shared::dxgiformat::DXGI_FORMAT;
use shared::guiddef::{CLSID, REFCLSID};
use shared::minwindef::{BOOL, BYTE, DWORD, FLOAT};
use um::d2d1::{
D2D1_ANTIALIAS_MODE, D2D1_BRUSH_PROPERTIES, D2D1_CAP_STYLE, D2D1_C... | the_stack |
pub mod ad_structure;
pub mod advertising;
mod channel_map;
mod comp_id;
mod connection;
pub mod data;
mod device_address;
mod features;
pub mod filter;
pub mod llcp;
pub mod queue;
mod responder;
mod seq_num;
pub use self::comp_id::*;
pub use self::connection::Connection;
pub use self::device_address::*;
pub use self... | the_stack |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the... | the_stack |
use core::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use core::arch::x86_64::*;
use core::mem::MaybeUninit;
use crate::core::{
storage::{Align16, Columns2, Columns3, Columns4, XY, XYZ},
traits::{
matrix::{
FloatMatrix2x2, FloatMatrix3x3, FloatMatrix4x4, Matrix, Matrix2x2, Matrix3x3,
... | the_stack |
use super::configs::{path_name, Configs};
use super::typing::TypeEnv;
use super::value::{IDLArgs, IDLField, IDLValue, VariantValue};
use crate::types::{Field, Type};
use crate::Deserialize;
use crate::{Error, Result};
use arbitrary::{unstructured::Int, Arbitrary, Unstructured};
use std::collections::HashSet;
use std::c... | the_stack |
use std::collections::{BTreeMap, HashMap};
use std::error::Error;
use crate::qaprotocol::qifi::account::{Account, Order, Position, Trade, QIFI};
use chrono::{Local, TimeZone, Utc};
use csv;
use serde::{Deserialize, Serialize};
use crate::qaaccount::marketpreset::MarketPreset;
use crate::qaaccount::order::QAOrder;
use... | the_stack |
use std::collections::HashMap;
use std::error::Error;
use std::convert::TryInto;
use id3::{Version, Tag, Timestamp, Frame, Content};
use id3::frame::{Picture, PictureType, Comment, Lyrics};
use serde::{Serialize, Deserialize};
use crate::tag::{TagDate, CoverType, Field, TagImpl};
const COVER_TYPES: [(PictureType, Cove... | the_stack |
use bumpalo::Bump;
use serde::de::{
DeserializeSeed, Deserializer, EnumAccess, MapAccess, SeqAccess, VariantAccess, Visitor,
};
use std::marker::PhantomData;
use std::{any, fmt, mem};
#[repr(C)]
pub struct ArenaDeserializer<'arena, 'de, D> {
arena: &'arena Bump, // must be first field
delegate: D,
mark... | the_stack |
use crate::dataframe::DataFrame;
use crate::error::DataFrameError;
use crate::evaluation::Evaluate;
use crate::expression::*;
use arrow::datatypes::{DataType, Schema};
use arrow::error::ArrowError;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
/// A lazy dataframe
#[derive(Serialize, Deserialize, Debug, Cl... | the_stack |
// Export the version of lua52_sys in use by this crate. This allows clients to perform low-level
// Lua operations without worrying about semver.
#[doc(hidden)]
pub extern crate lua52_sys as ffi;
extern crate libc;
use std::ffi::{CStr, CString};
use std::io::Read;
use std::io::Error as IoError;
use std::borrow::Borro... | the_stack |
use crate::{
error::{ImageCliError, Result},
example::Example,
expr::Expr,
parse_utils::{
int, named_arg, nonempty_sequence, op_four, op_one, op_one_opt, op_two, op_zero,
},
ImageStack,
};
use image::{
Bgr, Bgra, DynamicImage, DynamicImage::*, GenericImage, GenericImageView, Luma, Lu... | 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: &[] },
0x2F => GlyphVariants { // slash
constructable: None,
... | the_stack |
// This file is generated by rust-protobuf 2.22.1. Do not edit
// @generated
// 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)]
#!... | the_stack |
use std::collections::HashMap;
use cylinder::{jwt::JsonWebTokenBuilder, secp256k1::Secp256k1Context, Context, Signer};
use reqwest::blocking::Client;
use serde::Deserialize;
use splinter::admin::client::event::EventType;
use splinter::admin::messages::AuthorizationType;
use splinter::biome::profile::store::ProfileBuil... | the_stack |
use crate::*;
pub enum StackOrientation {
Horizontal,
Vertical,
Z,
}
pub enum StackItem {
Fixed(f32),
Flexible,
}
/// 1-D stack layout to make the algorithm clear.
pub fn stack_layout(total: f32, sizes: &[StackItem], intervals: &mut [(f32, f32)]) -> f32 {
assert_eq!(sizes.len(), intervals.len... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.