text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use std::ops::Range;
use std::{fmt::Display, hash::Hash};
use eframe::egui::{vec2, Id, Response, ScrollArea, Sense, TextStyle, Ui, Vec2, Widget};
const DEFAULT_COLUMN_WIDTH: f32 = 200.0;
/// An ordinary table. Feature set is currently pretty limited.
///
/// - `R`: The data type of a single row displayed.
/// - `C`:... | the_stack |
// TODO: Move this file into a separate crate.
use smartstring::alias::{String as SmartString};
use smallvec::SmallVec;
use crate::list::TraversalComponent;
use TraversalComponent::*;
use crate::list::ot::traversal::TraversalOp;
use rle::AppendRle;
use crate::unicount::chars_to_bytes;
use crate::list::ot::editablestri... | the_stack |
use crate::metrics::F64;
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
use std::collections::BTreeMap;
use std::fmt;
pub enum Stats {
Mean,
COV, // coefficient of variation
MDTM, // mean distance to mean
}
// TODO maybe use https://docs.rs/hdrhistogram/7.0.0/hdrhistogram/
#[derive(Default,... | the_stack |
#[cfg(test)]
#[macro_use]
extern crate lazy_static;
#[cfg(test)]
use std::sync::Mutex;
// build a "fake" flash area for tests
#[cfg(test)]
lazy_static! {
static ref EMU_FLASH: Mutex<Vec<u8>> = Mutex::new(vec![]);
}
pub mod api;
pub use api::*;
use xous::{CID, send_message, Message};
use num_traits::*;
use xous_i... | the_stack |
use super::super::rng256::Rng256;
use alloc::vec;
use alloc::vec::Vec;
use arrayref::{array_mut_ref, array_ref};
use byteorder::{BigEndian, ByteOrder};
use core::ops::{Add, AddAssign, Sub, SubAssign};
use subtle::{self, Choice, ConditionallySelectable, ConstantTimeEq};
const BITS_PER_DIGIT: usize = 32;
const BYTES_PER... | the_stack |
use std::{collections::HashSet, convert::TryFrom};
use zebra_chain::{
amount::{Amount, Error, NonNegative},
block::Height,
parameters::{Network, NetworkUpgrade::*},
transaction::Transaction,
transparent,
};
use crate::parameters::subsidy::*;
/// The divisor used for halvings.
///
/// `1 << Halvin... | the_stack |
use crate::internals::symbol::*;
use crate::internals::Ctxt;
use proc_macro2::{Group, Span, TokenStream, TokenTree};
use quote::{quote, quote_spanned, ToTokens};
use std::borrow::Cow;
use std::str::FromStr;
use syn::parse::{self, Parse};
use syn::spanned::Spanned;
use syn::Lit::{Float, Int};
use syn::Meta::{List, NameV... | the_stack |
use nalgebra::{Point2, Vector2};
use std::fmt::{self, Write};
use std::num::ParseIntError;
use std::str::FromStr;
use xray_proto_rust::proto;
#[derive(Debug, Clone)]
pub struct Rect {
min: Point2<f64>,
edge_length: f64,
}
impl Rect {
pub fn new(min: Point2<f64>, edge_length: f64) -> Self {
Rect { ... | the_stack |
use crate::constants::*;
#[cfg(feature = "cookies")]
use crate::cookie::Cookie;
use crate::file_handler::FileHandler;
use crate::time::Time;
use octane_http::{HttpVersion, StatusCode};
use std::collections::HashMap;
use std::error::Error;
use std::fmt;
use std::io::Cursor;
use std::marker::PhantomData;
use std::path::P... | the_stack |
use joker::track::*;
use joker::token::{Token, TokenData};
use joker::word::{Atom, Name, Reserved};
use joker::lexer::Lexer;
use easter::stmt::{Stmt, Block, StmtListItem, ForHead, ForInHead, ForOfHead, Case, Catch, Script, Dir, ModItem, Module};
use easter::expr::{Expr, ExprListItem};
use easter::decl::{Decl, Dtor, Con... | the_stack |
extern crate libc;
use exception::{
self, ABORT, CONTROL_STRUCTURE_MISMATCH, DIVISION_BY_ZERO, FLOATING_POINT_STACK_OVERFLOW,
FLOATING_POINT_STACK_UNDERFLOW, FLOATING_POINT_UNIDENTIFIED_FAULT, INTEGER_UNIDENTIFIED_FAULT,
INTERPRETING_A_COMPILE_ONLY_WORD, INVALID_EXECUTION_TOKEN, INVALID_MEMORY_ADDRESS,
... | the_stack |
use std::{
fs::{self, File},
io::prelude::*,
ops::Deref,
path::PathBuf,
sync::{Arc, Mutex},
};
use std::clone::Clone;
use std::sync::MutexGuard;
use enigma_tools_m::keeper_types::{InputWorkerParams, EPOCH_CAP};
use ethabi::{Log, RawLog};
use failure::Error;
use rmp_serde::{Deserializer, Serializer}... | the_stack |
use std::mem;
use std::net::SocketAddr;
use crypto::hash::OperationHash;
use tezos_messages::p2p::binary_message::MessageHash;
use tezos_messages::p2p::encoding::peer::PeerMessage;
use crate::mempool::OperationKind;
use crate::peers::remove::PeersRemoveAction;
use crate::protocol::ProtocolAction;
use crate::{Action, ... | the_stack |
use std::collections::HashMap;
use crate::ty;
use crate::ty::list_iter::ListIterator;
use crate::ty::purity;
use crate::ty::purity::Purity;
use crate::ty::record;
use crate::ty::ty_args::TyArgs;
use crate::ty::Ty;
pub enum Error<'vars> {
UnselectedPVar(&'vars purity::PVarId),
UnselectedTVar(&'vars ty::TVarId)... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_cas... | the_stack |
use std::{mem, ptr};
use std::sync::atomic::{self, AtomicPtr};
use std::marker::PhantomData;
use add_garbage_box;
use guard::Guard;
/// A concurrently accessible and updatable optional pointer.
///
/// This acts as a kind of concurrent `Option<T>`. It can be compared to `std::cell::RefCell` in
/// some ways: It allo... | the_stack |
use langcraft::interpreter::InterpError;
use langcraft::{Datapack, Interpreter, BuildOptions};
use std::path::PathBuf;
// TODO: Allow specifying breakpoints somehow
fn run_interpreter(interp: &mut Interpreter) -> Result<(), Box<dyn std::error::Error>> {
let mut hit_breakpoint = false;
let stdin = std::io::std... | the_stack |
use std::rc::Rc;
use std::cell::RefCell;
use std::fmt;
use std::ops::{Drop, Deref, DerefMut};
use std::convert::{AsRef, AsMut};
use std::cmp::{Ord, PartialOrd, PartialEq, Eq, Ordering};
use std::hash::{Hash, Hasher};
use std::borrow::Borrow;
use std::collections::VecDeque;
use std::mem::ManuallyDrop;
use std::ptr;
///... | the_stack |
use crate::lib::diagnosis::DiagnosedError;
use crate::lib::environment::Environment;
use crate::lib::error::DfxResult;
use crate::lib::identity::identity_utils::CallSender;
use crate::lib::identity::Identity;
use crate::lib::models::canister_id_store::CanisterIdStore;
use crate::lib::operations::canister::get_local_cid... | the_stack |
use rendy::{
command::{DrawIndexedCommand, QueueId, RenderPassEncoder},
factory::Factory,
graph::{render::*, GraphContext, NodeBuffer, NodeImage},
hal::{device::Device, pso::DescriptorPool},
memory::MemoryUsageValue,
mesh::{AsVertex, Model, PosNormTangTex},
resource::{
Buffer, Buffer... | the_stack |
use pyo3::basic::CompareOp;
use pyo3::exceptions::PyTypeError;
use pyo3::prelude::*;
use pyo3::types::*;
use serde::ser::Error;
use serde::Deserialize;
use serde::Serialize;
use std::collections::hash_map::DefaultHasher;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::ops::Deref;
use crate::with_traceback;
/// ... | the_stack |
#![allow(clippy::unreadable_literal, clippy::needless_return)]
//! Testing energy computation for SPC/E water using data from
//! https://www.nist.gov/mml/csd/chemical-informatics-research-group/spce-water-reference-calculations-9å-cutoff
//! https://www.nist.gov/mml/csd/chemical-informatics-research-group/spce-water-... | the_stack |
use std::io;
use std::io::Write;
use rustyline::Editor;
use termion::event::Key;
use termion::event::MouseButton::{Left, WheelDown, WheelUp};
use termion::event::MouseEvent::Press;
use crate::flatjson;
use crate::input::TuiEvent;
use crate::input::TuiEvent::{KeyEvent, MouseEvent, WinChEvent};
use crate::screenwriter:... | the_stack |
use crate::utils;
use crate::Test;
use io_uring::{opcode, squeue, types, IoUring};
use once_cell::sync::OnceCell;
use std::net::{TcpListener, TcpStream};
use std::os::unix::io::AsRawFd;
use std::{io, mem};
static TCP_LISTENER: OnceCell<TcpListener> = OnceCell::new();
fn tcp_pair() -> io::Result<(TcpStream, TcpStream)... | the_stack |
use super::{
attr, attr_id, attr_itemprop, attr_itemtype, attr_itemtype_str, attr_prop, concat, elem,
elem_empty, json, Context, ToHtml,
};
use crate::methods::encode::txt::ToTxt;
use html_escape::encode_safe;
use std::{fs, path::PathBuf};
use stencila_schema::*;
impl ToHtml for InlineContent {
fn to_html(... | the_stack |
use std::cmp::Ordering;
use std::future::{pending, Pending};
use std::mem::size_of;
use std::pin::Pin;
use std::sync::atomic::{self, AtomicBool};
use std::sync::Arc;
use std::thread::sleep;
use std::time::Duration;
use mio::Token;
use crate::actor::{self, Actor, NewActor};
use crate::rt::process::{
ActorProcess, ... | the_stack |
use alloc::alloc::{AllocError, Layout};
use core::mem::size_of;
use core::ptr::NonNull;
/// A sorted list of holes. It uses the the holes itself to store its nodes.
pub struct HoleList {
first: Hole, // dummy
}
impl HoleList {
/// Creates an empty `HoleList`.
pub const fn empty() -> HoleList {
HoleList {
firs... | the_stack |
use crate::core::support::emulated_time::{self, EmulatedTime};
use crate::core::worker::Worker;
use crate::host::host::HostInfo;
use crate::utility::time::TimeParts;
use crossbeam::queue::ArrayQueue;
use log::{Level, Log, Metadata, Record, SetLoggerError};
use log_bindings as c_log;
use once_cell::sync::Lazy;
use std::... | the_stack |
use actor::*;
use actorv0::multisig as msig0;
use address::Address;
use blockstore::BlockStore;
use chain::*;
use cid::Cid;
use clock::ChainEpoch;
use fil_types::{FILECOIN_PRECISION, FIL_RESERVED};
use interpreter::CircSupplyCalc;
use networks::{
UPGRADE_ACTORS_V2_HEIGHT, UPGRADE_CALICO_HEIGHT, UPGRADE_IGNITION_HEI... | the_stack |
use parquet2::{
metadata::KeyValue,
schema::{
types::{
DecimalType, IntType, LogicalType, ParquetType, PhysicalType, PrimitiveConvertedType,
TimeType, TimeUnit as ParquetTimeUnit, TimestampType,
},
Repetition,
},
};
use crate::{
datatypes::{DataType, Fiel... | the_stack |
mod template_helpers;
mod util;
#[cfg(test)]
mod test_util;
use anyhow::{anyhow, bail, Context};
use argh::FromArgs;
use chrono::{Datelike, Utc};
use handlebars::Handlebars;
use serde::Serialize;
use std::collections::HashMap;
use std::path::{Component, Path, PathBuf};
use std::str::FromStr;
use std::{fmt, fs, io};
u... | the_stack |
use super::AddArgs;
use crate::v0::support::StringError;
use bytes::{Buf, BufMut, Bytes, BytesMut};
use cid::Cid;
use futures::stream::{Stream, StreamExt, TryStreamExt};
use ipfs::unixfs::ll::{
dir::builder::{
BufferingTreeBuilder, TreeBuildingFailed, TreeConstructionFailed, TreeNode, TreeOptions,
},
... | the_stack |
use {
super::{
cond_bg,
Col,
CropWriter,
GitStatusDisplay,
SPACE_FILLING, BRANCH_FILLING,
MatchedString,
},
crate::{
app::AppState,
content_search::ContentMatch,
errors::ProgramError,
file_sum::FileSum,
pattern::PatternO... | the_stack |
use ffi;
use types::*;
use callbacks::*;
use dsp_connection;
use fmod_sys;
use fmod_sys::{MemoryUsageDetails, Sys};
use std::mem::transmute;
use channel;
use libc::{c_char, c_void, c_uint, c_int, c_float};
use std::default::Default;
use c_vec::CVec;
use std::ffi::CString;
extern "C" fn create_callback(dsp_state: *mut ... | the_stack |
use std::sync::atomic::{AtomicUsize, Ordering};
use std::cell::{Cell, RefCell};
use std::collections::HashMap;
use std::cmp::{min, max};
use std::time::Instant;
use super::*;
use crate::worker::{Strategy, WorkerRuntimeInfo};
use crate::event::{WaterMark, EventManager};
use crate::dataflow::{Dcg, Dataflow};
use crate::o... | the_stack |
use core::{
alloc as heap_alloc,
ffi::c_void,
mem::{size_of, transmute},
ptr::null_mut,
};
use atomic_refcell::AtomicRefCell;
use linked_list_allocator::LockedHeap;
use r_efi::{
efi::{
self, AllocateType, Boolean, CapsuleHeader, Char16, Event, EventNotify, Guid, Handle,
InterfaceTyp... | the_stack |
pub mod size {
pub fn choose_size<I: Iterator<Item = usize>, F>(
sizes: I,
unused: F,
max_objects_per_slab: usize,
) -> usize
where
F: Fn(usize) -> Option<(usize, usize)>,
{
fn leq(a: f64, b: Option<f64>) -> bool {
match b {
None => tru... | the_stack |
use crate::{
choose_best_split::{
choose_best_split_root, choose_best_splits_not_root, ChooseBestSplitOutput,
ChooseBestSplitRootOptions, ChooseBestSplitSuccess, ChooseBestSplitsNotRootOptions,
},
compute_bin_stats::BinStats,
compute_binned_features::{BinnedFeaturesColumnMajor, BinnedFeaturesRowMajor},
compute... | the_stack |
use super::*;
use s2n_quic_core::{
event::{builder::Path, testing::Publisher},
time::timer::Provider,
varint::VarInt,
};
use std::ops::Deref;
/// Return ECN counts with the given counts
fn helper_ecn_counts(ect0: u8, ect1: u8, ce: u8) -> EcnCounts {
EcnCounts {
ect_0_count: VarInt::from_u8(ect0... | the_stack |
itemmacro!(this, is.now() .formatted(yay));
itemmacro!(really, long.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb() .is.formatted());
itemmacro!{this, is.brace().formatted()}
fn main() {
foo! ( );
foo!(,);
bar!( a , b , c );
bar!( a , b , c , );
baz!(1+2+3, quux. kaa... | the_stack |
use crate::common::consts::AGENT_VERSION;
use crate::types::AgentErrorCode;
use crate::uname::common::UnameExt;
use crate::uname::Uname;
use serde::{Deserialize, Serialize};
#[cfg(windows)]
use std::io::Write;
//==============================================================================
// Declare standard request ... | the_stack |
use std::iter::Sum;
use std::collections::VecDeque;
use std::pin::Pin;
use std::marker::Unpin;
use std::cmp::Ordering;
use std::future::Future;
use std::task::{Poll, Context};
use futures_core::Stream;
use futures_util::stream;
use futures_util::stream::StreamExt;
use pin_project::pin_project;
use crate::s... | the_stack |
use crate::{
block::MAX_BLOCK_BYTES,
primitives::Groth16Proof,
sapling::{
output::{
Output, OutputInTransactionV4, OutputPrefixInTransactionV5, OUTPUT_PREFIX_SIZE,
OUTPUT_SIZE,
},
spend::{
Spend, SpendPrefixInTransactionV5, ANCHOR_PER_SPEND_SIZE,
... | the_stack |
use crate::cx_web::*;
use crate::universal_file::UniversalFile;
use crate::zerde::*;
use crate::*;
use std::alloc;
use std::cell::UnsafeCell;
use std::collections::{BTreeSet, HashMap};
use std::mem;
use std::ptr;
use std::sync::Arc;
// These constants must be kept in sync with the ones in web/zerde_eventloop_events.ts... | the_stack |
use std::collections::VecDeque;
use crate::{
api::inject_endpoints,
db::DatabasePeer,
util::{form_body, json_response, json_status_response, status_response},
ServerError, Session,
};
use hyper::{Body, Method, Request, Response, StatusCode};
use shared::PeerContents;
use wireguard_control::DeviceUpdate... | the_stack |
use super::autodetect::BUFFER_SIZE;
use crate::{rounds::Rounds, BLOCK_SIZE, CONSTANTS, IV_SIZE, KEY_SIZE};
use core::{convert::TryInto, marker::PhantomData};
#[cfg(target_arch = "x86")]
use core::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use core::arch::x86_64::*;
/// The number of blocks processed per invocation ... | the_stack |
use super::*;
use flo_canvas::*;
use std::sync::*;
use std::time::Duration;
#[test]
fn fetch_element_by_id() {
let anim = create_animation();
anim.perform_edits(vec![
AnimationEdit::AddNewLayer(2),
AnimationEdit::Layer(2, LayerEdit::AddKeyFrame(Duration::from_millis(50))),
AnimationE... | the_stack |
#![allow(unsafe_code)]
#![allow(clippy::undocumented_unsafe_blocks)]
use super::super::c;
use super::super::conv::{
by_mut, by_ref, c_int, c_uint, negative_pid, pass_usize, ret, ret_c_int, ret_c_uint,
ret_infallible, ret_usize, ret_usize_infallible, size_of, slice_just_addr, slice_mut, zero,
};
use super::type... | the_stack |
use super::Color;
use alloc::{
string::{String, ToString},
vec::Vec,
};
pub const A1: Position = Position::new(0, 0);
pub const A2: Position = Position::new(1, 0);
pub const A3: Position = Position::new(2, 0);
pub const A4: Position = Position::new(3, 0);
pub const A5: Position = Position::new(4, 0);
pub const... | the_stack |
use std::{borrow::Cow, collections::HashSet, fmt, pin::Pin, sync::Arc};
use futures::{
future::{self, Either},
prelude::*,
stream::Stream,
};
use tokio::time::{sleep, Sleep};
use tower::Service;
use tracing_futures::Instrument;
use zebra_chain::{
block::{self, Block},
serialization::SerializationE... | the_stack |
use std::io::{self, BufRead, Read, BufReader, Error, ErrorKind, Write};
use std::{cmp,mem};
use super::InflateStream;
/// Workaround for lack of copy_from_slice on pre-1.9 rust.
#[inline]
fn copy_from_slice(mut to: &mut [u8], from: &[u8]) {
assert_eq!(to.len(), from.len());
to.write_all(from).unwrap();
}
///... | the_stack |
use crate::{
function_data_builder::{FunctionDataBuilder, FunctionDataBuilderOptions},
function_target::{FunctionData, FunctionTarget},
function_target_pipeline::{FunctionTargetProcessor, FunctionTargetsHolder},
graph::{Graph, NaturalLoop},
options::ProverOptions,
stackless_bytecode::{AttrId, By... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateApplicationOutput {}
impl std::fmt::Debug for UpdateApplicationOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.deb... | the_stack |
use std::{
collections::{BTreeMap, BTreeSet},
env,
};
use defmt_parser::Level;
use proc_macro2::TokenStream as TokenStream2;
use proc_macro_error::abort_call_site;
use quote::quote;
use self::parse::{Entry, LogLevelOrOff, ModulePath};
mod parse;
#[derive(Debug)]
pub(crate) struct EnvFilter {
// to keep ... | the_stack |
use super::EncoderWriter;
use crate::tests::random_config;
use crate::{encode_config, encode_config_buf, STANDARD_NO_PAD, URL_SAFE};
use std::io::{Cursor, Write};
use std::{cmp, io, str};
use rand::Rng;
#[test]
fn encode_three_bytes() {
let mut c = Cursor::new(Vec::new());
{
let mut enc = EncoderWrit... | the_stack |
use super::super::class::class::Class;
use super::super::class::classfile::constant::Constant;
use super::super::class::classfile::{method, method::MethodInfo};
use super::super::class::classheap::ClassHeap;
use super::super::gc::gc::GcType;
use super::cfg::CFGMaker;
use super::frame::{AType, Array, Frame, ObjectBody, ... | the_stack |
use std::future::Future;
use std::lazy::SyncLazy;
use std::mem::size_of;
use std::pin::Pin;
use std::stream::Stream;
use std::sync::atomic::{AtomicU8, AtomicUsize, Ordering};
use std::sync::Arc;
use std::task::{self, Poll};
use std::time::{Duration, Instant};
use std::{fmt, io, slice, thread};
use getrandom::getrandom... | the_stack |
#[cfg(feature = "igd")]
use super::igd::{forward_port, IgdError};
use super::wire_msg::WireMsg;
use super::{
config::{Config, InternalConfig, RetryConfig, SERVER_NAME},
connection::{Connection, ConnectionIncoming},
error::{
ClientEndpointError, ConnectionError, EndpointError, RecvError, RpcError,
... | the_stack |
#[macro_use]
extern crate serde_derive;
use std::collections::HashMap;
use crate::serde::serialize_hashmap_deterministic;
pub use self::action::*;
pub use self::bone::*;
pub use self::coordinate_system::*;
pub use self::export::*;
pub use self::interpolate::*;
use std::borrow::Borrow;
use std::hash::Hash;
mod actio... | the_stack |
use kurbo::{Rect, Size};
use nix::{
errno::Errno,
fcntl::OFlag,
sys::{
mman::{mmap, munmap, shm_open, MapFlags, ProtFlags},
stat::Mode,
},
unistd::{close, ftruncate},
};
use std::{
cell::{Cell, RefCell},
convert::{TryFrom, TryInto},
fmt,
ops::{Deref, DerefMut},
os... | the_stack |
use crate::{bn::U192, math::FeeCalculator};
use num_traits::ToPrimitive;
use stable_swap_client::{
fees::Fees,
solana_program::{clock::Clock, program_error::ProgramError, sysvar::Sysvar},
state::SwapInfo,
};
/// Number of coins in a swap.
/// The Saber StableSwap only supports 2 tokens.
pub const N_COINS: ... | the_stack |
use crate::imp::{core::*, impl_future::*, prelude::*};
use serde_json::value::Value;
use std::{fmt::Debug, future::Future, pin::Pin, sync::TryLockError, task::Waker};
pub(crate) fn upgrade<T>(w: &Weak<T>) -> Result<Arc<T>, Error> {
w.upgrade().ok_or(Error::ObjectNotFound)
}
pub(crate) fn weak_and_then<T, U, F>(w:... | the_stack |
use ::tui::layout::Rect;
use crate::state::tiles::{FileMetadata, RectFloat, Tile};
const HEIGHT_WIDTH_RATIO: f64 = 2.5;
const MINIMUM_HEIGHT: u16 = 3;
const MINIMUM_WIDTH: u16 = 8;
pub struct TreeMap {
pub tiles: Vec<Tile>,
pub unrenderable_tile_coordinates: Option<(u16, u16)>,
empty_space: RectFloat,
... | the_stack |
// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
use super::structs::{
BatchProof, Challenges, PlookupProof, ProofEvaluations, ScalarsAndBases, VerifyingKey,
};
use crate::{
circuit::customized::ecc::SWToTEConParam,
constants... | the_stack |
#[cfg(any(feature = "rest-client", feature = "rpc-client"))]
mod utils;
#[cfg(any(feature = "rest-client", feature = "rpc-client"))]
pub mod http_clients;
pub mod dns_headers;
use lightning::chain::{chaininterface, keysinterface};
use lightning::chain::chaininterface::{BlockNotifierArc, ChainListener};
use lightning... | the_stack |
use assert_cmd::prelude::*; // Add methods on commands
use predicates::prelude::*; // Used for writing assertions
use std::process::Command; // Run programs
// use assert_cmd::cmd::Command; // Run programs - it seems to be equal to "use assert_cmd::prelude::* + use std::process::Command"
use... | the_stack |
use cfmt_b::{
fmt::{ComputeStrLength, Error, Formatter, FormattingFlags, StrWriter, StrWriterMut},
impl_fmt, try_,
wrapper_types::PWrapper,
};
use arrayvec::ArrayString;
use core::{fmt::Write, marker::PhantomData};
////////////////////////////////////////////////////////////////////////////////
struct D... | the_stack |
/// Constructs [`Value`]s via JSON-like syntax.
///
/// [`Value`] objects are used mostly when creating custom errors from fields.
///
/// [`Value::Object`] key should implement [`AsRef`]`<`[`str`]`>`.
/// ```rust
/// # use juniper::{graphql_value, Value};
/// #
/// let code = 200;
/// let features = ["key", "value"];
... | the_stack |
use std::fmt::{Display, Formatter};
use std::io::{Read, Write};
use std::net::SocketAddr;
use std::net::{TcpListener, TcpStream};
use std::num::ParseIntError;
use std::sync::{Arc, Mutex};
use anyhow::Context;
use clap::{ArgEnum, Parser};
use colored::Colorize;
use log::{Level, LevelFilter};
use time::macros::format_de... | the_stack |
use std::ops;
use std::iter;
use std::u8;
use std::i32;
use std::usize;
use std::fmt;
use std::result;
use std::collections::{hash_map, HashMap};
use kailua_env::{Pos, Span, Spanned, WithLoc, Scope, ScopedId, ScopeMap};
use kailua_diag::{report, Locale, Report, Reporter, Localize};
use message as m;
use lang::{Languag... | the_stack |
use crate::feature_writer::{prop_type, FeatureWriter};
use crate::header_generated::{ColumnType, Crs, CrsArgs, GeometryType};
use crate::packed_r_tree::{calc_extent, hilbert_sort, NodeItem, PackedRTree};
use crate::{Column, ColumnArgs, Header, HeaderArgs, MAGIC_BYTES};
use flatbuffers::FlatBufferBuilder;
use geozero::e... | the_stack |
//! Building blocks for creating HTTP API of Rust services.
pub use exonum_api::{Deprecated, EndpointMutability, Error, HttpStatusCode, Result};
use actix_web::{
web::{Bytes, Json},
FromRequest, HttpMessage,
};
use exonum::{
blockchain::{Blockchain, Schema as CoreSchema},
crypto::PublicKey,
merkle... | the_stack |
//! Provides an async blocking pool whose tasks can be cancelled.
use std::{
collections::HashMap,
sync::Arc,
time::{Duration, Instant},
};
use crate::BlockingPool;
use async_task::Task;
use once_cell::sync::Lazy;
use sync::{Condvar, Mutex};
use thiserror::Error as ThisError;
/// Global executor.
///
///... | the_stack |
use std::fmt;
use std::io;
use std::marker::PhantomData;
use std::mem;
use std::ptr;
use std::u64;
use std::usize;
use crate::Buffer;
use crate::BufferRef;
use crate::buffer::{Readable, Writable};
pub struct BufferCursor<T> {
buffer: Option<Buffer>,
size: u64,
num_mem: u32,
cur_mem_idx: u32,
cur_... | the_stack |
use super::md;
use crate::methods::{decode::txt, transform::Transform};
use eyre::Result;
use kuchiki::{traits::*, ElementData, NodeRef};
use markup5ever::{local_name, LocalName};
use std::cmp::max;
use stencila_schema::{
Article, AudioObjectSimple, BlockContent, CodeBlock, CodeChunk, CodeExpression, CodeFragment,
... | the_stack |
use crate::error::*;
use crate::kubernetes::deployment::KubernetesDeploymentResource;
use crate::kubernetes::replicaset::KubernetesReplicaSetResource;
use crate::kubernetes::statefulset::KubernetesStatefulSetResource;
use crate::kubernetes::KubernetesResource;
use crate::kubernetes::KubernetesResourceTrait;
use crate::... | the_stack |
use rustix::net::{
AddressFamily, Ipv6Addr, Protocol, RecvFlags, SendFlags, SocketAddrAny, SocketAddrV4,
SocketAddrV6, SocketType,
};
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
/// Test `connect_any`.
#[test]
fn net_v4_connect_any() -> std::io::Result<()> {
let localhost = IpAddr::V4(Ipv4Addr::LOCALHOST... | the_stack |
use crate::codegen::arch::dag::node::MemKind;
use crate::codegen::arch::frame_object::FrameIndexInfo;
use crate::codegen::arch::machine::abi::SystemV;
use crate::codegen::arch::machine::inst::*;
use crate::codegen::arch::machine::register::*;
pub use crate::codegen::common::dag::mc_convert::ScheduleContext;
use crate::... | the_stack |
use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::mpsc;
use crate::capabilities::server_capabilities;
use crate::handler;
use crate::json_rpc::{ClientMessage, ErrorCode, Response, ServerMessage};
use crate::model::{Document, Workspace};
use crate::transport::Connection;
use crate::watcher::SyntaxWat... | the_stack |
use super::behavior::{NcpRecvEvent, NcpSendEvent};
use super::protocol::{NcpCodec, NcpConfig, NcpMessage};
use futures::prelude::*;
use futures::task::{Context, Poll};
use libp2p_core::upgrade::{InboundUpgrade, OutboundUpgrade};
use libp2p_swarm::protocols_handler::{
KeepAlive, ProtocolsHandler, ProtocolsHandlerEv... | the_stack |
use crate::base::octets::{
EmptyBuilder, FromBuilder, OctetsBuilder, ShortBuf,
};
use core::fmt;
#[cfg(feature = "std")]
use std::string::String;
//------------ Convenience Functions -----------------------------------------
/// Decodes a string with *base64* encoded data.
///
/// The function attempts to decode ... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_cas... | the_stack |
use crate::frame_constants::FrameConstants;
use macaw::{
const_mat3, FloatExt, Mat3, UVec2, UVec3, Vec2, Vec3, Vec3Swizzles, Vec4, Vec4Swizzles,
};
#[cfg(target_arch = "spirv")]
use spirv_std::num_traits::Float;
pub fn get_uv_u(pix: UVec2, tex_size: Vec4) -> Vec2 {
(pix.as_vec2() + Vec2::splat(0.5)) * tex_size... | the_stack |
use std::fmt::Formatter;
use std::iter::Enumerate;
use std::mem;
use std::sync::Arc;
use std::{convert::TryInto, iter::Zip};
use arrow::error::ArrowError;
use arrow::{
array::{
ArrayDataBuilder, ArrayRef, BooleanArray, Float64Array, Int64Array,
TimestampNanosecondArray, UInt64Array,
},
data... | the_stack |
use std::fmt;
use std::mem;
use base::error::Errors;
use base::types::{self, ArcType, Field, Type, TypeVariable, TypeEnv, merge};
use base::symbol::{Symbol, SymbolRef};
use base::instantiate;
use base::scoped_map::ScopedMap;
use unify;
use unify::{Error as UnifyError, Unifier, Unifiable};
use substitution::{Variable,... | the_stack |
use super::{Clock, KeyClocks};
use crate::protocol::common::pred::CaesarDeps;
use fantoch::command::Command;
use fantoch::id::{Dot, ProcessId, ShardId};
use fantoch::kvs::Key;
use fantoch::shared::{SharedMap, SharedMapRef};
use fantoch::{HashMap, HashSet};
use parking_lot::{Mutex, RwLock};
use std::cmp::Ordering;
use s... | the_stack |
use std::cmp::Ordering;
use std::error::Error;
use std::thread;
use std::fs;
use std::path::{Path, PathBuf};
use std::fs::File;
use std::time::Duration;
use std::default::Default;
use std::io::prelude::*;
use std::sync::Arc;
use std::sync::mpsc::{channel, Receiver};
use chrono::Local;
use execute::Execute;
use regex::R... | the_stack |
use std::ptr;
use swym::{
tcell::TCell,
tptr::TPtr,
tx::{Error, Ordering, Read, Rw, Write},
};
use RBRef::{Null, Valid};
#[derive(Copy, Clone, PartialEq, Eq)]
pub enum Color {
Black = 0,
Red = 1,
}
struct PtrColor<K, V> {
raw: *const RBNode<K, V>,
}
impl<K, V> Clone for PtrColor<K, V> {
#... | the_stack |
use super::{Room, RoomKind, Surface};
use dungeon::{Coord, Direction, Positioned, X, Y};
use enum_iterator::IntoEnumIterator;
use error::*;
use fenwick::FenwickSet;
use fixedbitset::FixedBitSet;
use rect_iter::{IntoTuple2, RectRange};
use rng::{RngHandle, SliceRandom};
use std::collections::HashMap;
use tuple_map::Tupl... | the_stack |
mod VSOPD_87;
pub mod earth;
pub mod mars;
pub mod jupiter;
pub mod saturn;
use angle;
use coords;
use time;
/// Represents a planet
pub enum Planet {
/// Mercury *Helped with testing General Relativity*
Mercury,
/// Venus **Climate change was here**
Venus,
/// Earth *Pale blue dot, right?*
E... | the_stack |
use super::metadata;
use super::metadata::Metadata;
use super::metadata::MetadataID;
use super::metadata::UncheckedMetadata;
use super::metadata::*;
use crate::multihash;
#[test]
fn test_to_bytes_simple_cases() {
{
let expect = b"FNM\x0Ahelloworld";
let meta = [Metadata::FNM("helloworld".to_string(... | the_stack |
use core::{
any,
fmt::{
self,
Binary,
Debug,
Display,
Formatter,
},
iter::{
FusedIterator,
Sum,
},
marker::PhantomData,
ops::{
BitAnd,
BitOr,
Not,
},
};
use crate::{
mem::{
bits_of,
BitRegister,
},
order::BitOrder,
};
#[repr(transparent)]
#[doc = include_str!("../doc/index/BitIdx.md... | the_stack |
use cli_flow;
use colored::Colorize;
use database::Database;
use difference::{Changeset, Difference};
use rpassword;
use ssh2::Session;
use ssh_config;
use std::collections::HashMap;
use std::env;
use std::error::Error;
use std::io::prelude::*;
use std::io::Read;
use std::net::TcpStream;
use std::path::Path;
use std::s... | the_stack |
use bytes::{Buf, Bytes};
use diem_infallible::Mutex;
use futures::{
channel::mpsc::{self, UnboundedReceiver, UnboundedSender},
io::{AsyncRead, AsyncWrite, Error, ErrorKind, Result},
ready,
stream::{FusedStream, Stream},
task::{Context, Poll},
};
use once_cell::sync::Lazy;
use std::{collections::Hash... | the_stack |
use crate::{
command::Command,
physics::{Collider, Joint, RigidBody},
scene::{
clipboard::DeepCloneResult,
commands::{
graph::DeleteSubGraphCommand,
physics::{
DeleteBodyCommand, DeleteColliderCommand, DeleteJointCommand,
SetJointConnec... | the_stack |
// We used to implement `ARef` as an enum of `{Ptr(&'a T), Ref(Ref<'a, T>)}`.
// That works, but consumes 3 words and requires a branch on every access of the underlying
// pointer. We can optimise that by relying on the underlying details of `Ref`, which is
// (currently) defined as (after a bit of inlining):
//
// ``... | the_stack |
use rafx_framework::cooked_shader::{
ReflectedDescriptorSetLayout, ReflectedDescriptorSetLayoutBinding, ReflectedEntryPoint,
ReflectedVertexInput,
};
use crate::shader_types::{
element_count, generate_struct, MemoryLayout, TypeAlignmentInfo, UserType,
};
use fnv::FnvHashMap;
use rafx_api::{
RafxAddress... | the_stack |
use crate::PageSetup;
use crate::PaperSize;
use crate::PrintCapabilities;
use glib::object::Cast;
use glib::object::ObjectType as ObjectType_;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::ToValue;
use std::boxed::Box as Box_;
use std::fmt;
use... | the_stack |
// Code has been retrieved from the zerocopy crate.
// https://fuchsia.googlesource.com/fuchsia/+/master/src/lib/zerocopy/src/byteorder.rs
//! Byte order-aware numeric primitives.
//!
//! This module contains equivalents of the native multi-byte integer types with
//! no alignment requirement and supporting byte order... | the_stack |
/// This module provides various indexes used by Mempool.
use crate::core_mempool::transaction::{MempoolTransaction, SequenceInfo, TimelineState};
use crate::{
counters,
logging::{LogEntry, LogSchema},
};
use diem_logger::prelude::*;
use diem_types::{account_address::AccountAddress, transaction::GovernanceRole}... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.