text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use crate::feed_builder::FeedBuilder;
use crate::replicate::{Message, Peer};
pub use crate::storage::{Node, NodeTrait, Storage, Store};
use crate::audit::Audit;
use crate::bitfield::Bitfield;
use crate::crypto::{
generate_keypair, sign, verify, Hash, Merkle, PublicKey, SecretKey, Signature,
};
use crate::proof::Pr... | the_stack |
use serde::Serialize;
#[serde(untagged)]
#[derive(Serialize, Clone, Debug)]
pub enum ColorWrapper {
S(String),
F(f64),
}
impl PartialEq for ColorWrapper {
fn eq(&self, other: &Self) -> bool {
let lhs = match self {
ColorWrapper::S(v) => v.to_owned(),
ColorWrapper::F(v) => f... | the_stack |
pub struct ListAccountAssignmentCreationStatusPaginator<
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::list_account_assignment_creation_s... | the_stack |
mod error;
pub use error::{EyrosError,EyrosErrorKind,Error};
mod store;
pub use store::Storage;
#[cfg(not(feature="wasm"))] #[doc(hidden)] pub use store::FileStore;
mod setup;
pub use setup::{Setup,SetupFields};
pub mod tree;
#[doc(hidden)] pub use tree::{Tree,TreeRef,TreeId,Merge};
mod bytes;
mod query;
pub use query:... | the_stack |
use std::sync::Arc;
use rskafka::{
client::{
partition::{Compression, PartitionClient},
ClientBuilder,
},
record::{Record, RecordAndOffset},
};
mod java_helper;
mod rdkafka_helper;
mod test_helpers;
use test_helpers::{maybe_start_logging, now, random_topic_name, record};
#[tokio::test]
a... | the_stack |
use crate::{config::Colors, line_split::LineDataCache, termbox, utils};
use std::{cmp::min, ops::RangeBounds, vec::Drain};
use termbox_simple::Termbox;
#[derive(Clone, Debug)]
pub(crate) struct InputLine {
/// Input buffer
buffer: Vec<char>,
/// A cache that will allow us to quickly add
/// characters... | the_stack |
use std::collections::{HashMap, HashSet};
use std::fs::{File, Metadata};
use std::fs::{read_dir, remove_file, remove_dir, rename};
use std::fs::{symlink_metadata, read_link, hard_link};
use std::io::{self, BufReader, BufWriter, Seek, SeekFrom};
use std::os::unix::fs::{symlink, MetadataExt};
use std::path::{Path, PathBu... | the_stack |
use ef_tests::*;
use types::*;
// Check that the hand-computed multiplications on EthSpec are correctly computed.
// This test lives here because one is most likely to muck these up during a spec update.
fn check_typenum_values<E: EthSpec>() {
assert_eq!(
E::MaxPendingAttestations::to_u64(),
E::Max... | the_stack |
use std::{ fmt, cmp };
use crate::{
math::field,
OpCode,
PROGRAM_DIGEST_SIZE,
MIN_STACK_DEPTH, MIN_CONTEXT_DEPTH, MIN_LOOP_DEPTH,
OP_COUNTER_IDX, SPONGE_WIDTH, SPONGE_RANGE,
NUM_CF_OPS, NUM_LD_OPS, NUM_HD_OPS,
NUM_CF_OP_BITS, NUM_LD_OP_BITS, NUM_HD_OP_BITS,
CF_OP_BITS_RANGE, LD_OP_BITS_R... | the_stack |
//! Implementation of the Pinkas-Schneider-Tkachenko-Yanai "extended" private
//! set intersection protocol (cf. <https://eprint.iacr.org/2019/241>).
use crate::{cuckoo::CuckooHash, errors::Error, utils};
use fancy_garbling::{
twopac::semihonest::{Evaluator, Garbler},
BinaryBundle,
BundleGadgets,
CrtBu... | the_stack |
use std::f32::consts::PI;
use std::os::raw::c_void;
use std::path::Path;
use std::process;
use std::time::Instant;
use cgmath::{ Deg, Point3 };
use collision::Aabb;
use gl;
use gltf;
use glutin;
use glutin::{
Api,
MouseScrollDelta,
MouseButton,
GlContext,
GlRequest,
GlProfile,
VirtualKeyCod... | the_stack |
use core::sync::atomic::Ordering;
use super::qlib::{ShareSpace};
use super::qlib::common::*;
use super::qlib::qmsg::*;
use super::qlib::range::*;
use super::*;
use super::kvm_vcpu::KVMVcpu;
pub fn AQHostCall(msg: HostOutputMsg, _shareSpace: &ShareSpace) {
let _l = super::GLOCK.lock();
match msg {
Host... | the_stack |
use serde::{Deserialize, Serialize};
use std::any::Any;
use std::marker::PhantomData;
use weasel::ability::ActivateAbility;
use weasel::actor::{Action, Actor, ActorRules, AlterAbilities, RegenerateAbilities};
use weasel::battle::{Battle, BattleController, BattleRules, BattleState, EndBattle};
use weasel::character::{Al... | the_stack |
use std::cmp::Ordering;
use fnv::FnvHashMap;
use itertools::Itertools;
use serde::{Deserialize, Serialize};
use super::agg_req::{AggregationsInternal, BucketAggregationType, MetricAggregation};
use super::agg_result::BucketResult;
use super::bucket::{
cut_off_buckets, get_agg_name_and_property, GetDocCount, Order... | the_stack |
use super::dialogs::dialog_helpers;
use super::dialogs::project_add_edit_dlg::Msg as MsgProjectAddEditDialog;
use super::dialogs::project_add_edit_dlg::ProjectAddEditDialog;
use super::dialogs::project_item_move_dlg;
use super::dialogs::standard_dialogs;
use super::dialogs::unlock_db_dlg;
use super::dialogs::unlock_db_... | the_stack |
use serde::{Deserialize, Serialize};
use std::fmt;
/// SDPSemantics determines which style of SDP offers and answers
/// can be used
#[derive(Debug, PartialEq, Copy, Clone, Serialize, Deserialize)]
pub enum RTCSdpSemantics {
Unspecified = 0,
/// UnifiedPlan uses unified-plan offers and answers
/// (the de... | the_stack |
use std::io;
use partial_ref::{IntoPartialRef, IntoPartialRefMut, PartialRef};
use anyhow::Error;
use thiserror::Error;
use varisat_checker::ProofProcessor;
use varisat_dimacs::DimacsParser;
use varisat_formula::{CnfFormula, ExtendFormula, Lit, Var};
use crate::{
assumptions::set_assumptions,
config::Solver... | the_stack |
use std::fmt;
use crate::{
Argument, ArgumentsDefinition, Directive, InputValueDefinition, SelectionSet, StringValue,
Type_,
};
/// The FieldDefinition type represents each field definition in an Object
/// definition or Interface type definition.
///
/// *FieldDefinition*:
/// Description? Name ArgumentsD... | the_stack |
use super::{compat, idle, Builder};
use tokio_02::{
runtime::Handle as Handle02,
task::{JoinHandle, LocalSet},
};
use tokio_executor_01 as executor_01;
use tokio_reactor_01 as reactor_01;
use tokio_timer_02 as timer_02;
use futures_01::future::Future as Future01;
use futures_util::{compat::Future01CompatExt, ... | the_stack |
use std::cell::RefCell;
use std::fmt;
use std::io;
use std::rc::{Rc, Weak};
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, AtomicBool, ATOMIC_USIZE_INIT, Ordering};
use std::time::{Instant, Duration};
use tokio;
use tokio::executor::current_thread::{CurrentThread, TaskExecutor};
use tokio_executor;
use tokio... | the_stack |
use crate::errors::Result;
use std::collections::HashMap;
use std::collections::HashSet;
use std::fs;
use std::iter::{Extend, FromIterator};
use std::path::{Path, PathBuf};
use std::process::{Child, Command, Stdio};
use std::sync::{atomic::AtomicBool, Arc};
use xdg::BaseDirectories;
#[derive(Default)]
pub struct Nanny... | the_stack |
use std::io;
use std::io::{Write, BufWriter};
use std::fs::{File};
use std::fs::{create_dir_all, copy, metadata, symlink_metadata};
use std::path::{Path, PathBuf};
use std::collections::BTreeMap;
use libmount::{self, BindMount};
use failure::{Error, ResultExt, err_msg};
use lithos::mount::{mount_ro_recursive};
use li... | the_stack |
use std::{
net::SocketAddr,
time::Duration,
};
use futures::StreamExt;
use grapl_config::env_helpers::FromEnv;
use rusoto_s3::{
GetObjectRequest,
S3Client,
S3,
};
use rust_proto_new::{
graplinc::grapl::api::plugin_registry::v1beta1::{
CreatePluginRequest,
CreatePluginRequestMeta... | the_stack |
use super::*;
use crate::events::{Waiter, WaiterQueue};
use crate::util::sync::rw_lock::RwLockWriteGuard;
use process::pid_t;
use rcore_fs::vfs::AnyExt;
pub use self::builder::RangeLockBuilder;
pub use self::range::{FileRange, OverlapWith, OFFSET_MAX};
use self::range::{FileRangeChange, RangeLockWhence};
mod builder;... | the_stack |
#![allow(non_snake_case, non_camel_case_types, dead_code)]
extern crate jni_sys;
use std::os::raw::{c_char, c_uchar, c_int, c_uint, c_void};
use jni_sys::{jobject, jlong, jint, jvalue, jchar, jboolean, jfloat, jdouble, jclass, jmethodID,
jfieldID, JNIEnv, JNINativeInterface_};
use std::mem;
pub const J... | the_stack |
use crate::{
collections::TypedUsize,
crypto_tools::{
constants,
k256_serde::{self, SecretScalar},
},
gg20::sign::SignShareId,
sdk::api::{TofnFatal, TofnResult},
};
use ecdsa::{
elliptic_curve::{sec1::FromEncodedPoint, Field},
hazmat::FromDigest,
};
use serde::{Deserialize, S... | the_stack |
use byteorder::{ByteOrder, LittleEndian};
use bytes::{BufMut, Bytes, BytesMut};
use lazy_static::lazy_static;
use log::*;
use nix::poll::*;
use serde::Serialize;
use std::fs;
use std::fs::OpenOptions;
use std::io::prelude::*;
use std::io::{Error, ErrorKind};
use std::os::unix::io::AsRawFd;
use std::path::PathBuf;
use s... | the_stack |
use crate::cache::BoundingBox;
use femtovg::{Align, Baseline};
use morphorm::Units;
use crate::prelude::*;
use crate::style::{Rule, Selector, SelectorRelation};
use crate::text::{measure_text_lines, text_layout, text_paint_general};
use crate::tree::TreeExt;
pub fn apply_z_ordering(cx: &mut Context, tree: &Tree) {
... | the_stack |
use crate::gpu_debugger;
use crate::gpu_profiler::GpuProfilerStats;
use crate::gui::ImGuiBackend;
use crate::keyboard::*;
use crate::renderer::{RenderFrameStatus, Renderer};
use crate::texture::{Texture, TextureKey};
use crate::vulkan;
use crate::Vec2;
use ash::vk;
use clap::ArgMatches;
use imgui::im_str;
use snoozy::{... | the_stack |
use std::{
borrow::Borrow,
cell::UnsafeCell,
marker::PhantomData as marker,
ops::{Deref, DerefMut},
sync::{
atomic::{self, Ordering},
Arc,
},
time::Duration,
};
use super::{
readset::ReadSet,
transact::{TransactionState, Txn, TxnManager},
};
use super::version::*;
u... | the_stack |
use quote::quote;
use syn::{
parse_quote,
spanned::Spanned,
visit_mut::{self, VisitMut},
Expr, ExprAwait, ExprCall, ExprForLoop, ExprYield, Item, Token,
};
use crate::{
parse, stream, stream_block, try_stream_block,
utils::{expr_compile_error, replace_expr, unit, SliceExt},
};
/// The scope in... | the_stack |
use super::resolve;
use super::NormResult;
use crate::grammar::parse_tree::{
Alternative, ExprSymbol, Grammar, GrammarItem, NonterminalData, NonterminalString, Symbol,
SymbolKind,
};
use std::fmt;
use std::str::FromStr;
use string_cache::DefaultAtom as Atom;
#[cfg(test)]
mod test;
pub const PREC_ANNOT: &str =... | the_stack |
use core::panic;
use std::path::{Path, PathBuf};
use container_runtime::{ContainerRuntimeType, NetworkNamespaceType};
use kamu::infra::Manifest;
use kamu::infra::WorkspaceLayout;
use dill::*;
use duration_string::DurationString;
use merge::Merge;
use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_n... | the_stack |
use std::collections::HashMap;
#[cfg(feature = "bevy_renderer")]
use bevy::{prelude::Handle, reflect::TypeUuid, render::texture::Image};
use unicode_segmentation::UnicodeSegmentation;
use crate::utility::{BreakableWord, MISSING, SPACE};
use crate::{
utility, Alignment, Glyph, GlyphRect, Grapheme, Line, Sdf, TextL... | the_stack |
// Added by vfio_sys/bindgen.sh
use data_model::DataInit;
#[repr(C)]
#[derive(Debug, Default)]
pub struct vfio_region_info_with_cap {
pub region_info: vfio_region_info,
pub cap_info: __IncompleteArrayField<u8>,
}
// vfio_iommu_type1_info_cap_iova_range minus the incomplete iova_ranges
// array, so that Copy/D... | the_stack |
use pbr::ProgressBar;
use tract_data::internal::*;
use tract_linalg::{frame::MatMatMul, mmm::FusedSpec};
use rand::prelude::*;
use std::io::Write;
use std::ops::Range;
use std::str::FromStr;
use std::time::{Duration, Instant};
use tract_itertools::Itertools;
pub fn ruin_cache() {
let _a = (0..1_000_000).collect::... | the_stack |
use crate::{
caching::*,
dev_prelude::{
ChunkNode, ChunkStorage, ChunkTree, Compressed, Compression, FastArrayCompression,
FastChannelsCompression, FromBytesCompression, IterChunkKeys, NodeState,
},
SmallKeyBuildHasher,
};
use building_blocks_core::prelude::*;
use core::hash::Hash;
use... | the_stack |
use super::imports::*;
use cfg_if::cfg_if;
use std::{
borrow::Cow,
iter::{FromIterator, FusedIterator},
mem::size_of,
};
/// Ancillary data to be sent through a Unix domain socket or read from an input buffer.
///
/// Ancillary data gives unique possibilities to Unix domain sockets which no other POSIX API... | the_stack |
use crate::scene::*;
use bytemuck::{Pod, Zeroable};
use caldera::prelude::*;
use spark::{vk, Builder};
use std::sync::Arc;
use std::{mem, slice};
type PositionData = Vec3;
type IndexData = UVec3;
#[repr(C)]
#[derive(Clone, Copy, Zeroable, Pod)]
struct AabbData {
min: Vec3,
max: Vec3,
}
// vk::AccelerationStr... | the_stack |
use std::mem;
use std::str;
use std::fmt;
use std::collections::{HashMap, HashSet};
use vec_map::{self, VecMap};
use atomic::Atomic;
use atomic::Ordering::Relaxed;
use kailua_diag::Locale;
use diag::{Origin, TypeReport, TypeResult};
use ty::{Ty, T, Slot, TVar, RVar, Lattice, Key};
use ty::{TypeContext, ClassId, ClassS... | the_stack |
#![cfg(unix)]
#![cfg_attr(docsrs, doc(cfg(all(unix, feature = "signal"))))]
use crate::signal::registry::{globals, EventId, EventInfo, Globals, Init, Storage};
use crate::signal::RxFuture;
use crate::sync::watch;
use mio::net::UnixStream;
use std::io::{self, Error, ErrorKind, Write};
use std::pin::Pin;
use std::sync:... | the_stack |
#![cfg(test)]
use tap::conv::TryConv;
use crate::prelude::*;
/// Tests that constructors have the expected behavior and failures.
#[test]
fn construction() {
#[cfg(not(miri))]
use core::slice;
let data = 0u8;
let bits = data.view_bits::<LocalBits>();
assert_eq!(bits.len(), 8);
#[cfg(not(miri))]
assert!(
B... | the_stack |
//! Defines accessors for compiled modules.
use crate::{file_format::*, internals::ModuleIndex};
use move_core_types::{
account_address::AccountAddress,
identifier::{IdentStr, Identifier},
language_storage::ModuleId,
};
/// Represents accessors for a compiled module.
///
/// This is a trait to allow worki... | the_stack |
#![allow(clippy::needless_pass_by_value)]
use apply::Apply;
use futures::future::try_join_all;
use seed::{prelude::*, *};
use serde_wasm_bindgen as swb;
// ------ ------
// Init
// ------ ------
fn init(_: Url, orders: &mut impl Orders<Msg>) -> Model {
let worker_container = window().navigator().service_work... | the_stack |
use std::u16;
use crate::packed::pattern::Patterns;
use crate::packed::rabinkarp::RabinKarp;
use crate::packed::teddy::{self, Teddy};
use crate::Match;
/// This is a limit placed on the total number of patterns we're willing to try
/// and match at once. As more sophisticated algorithms are added, this number
/// may... | the_stack |
#![cfg_attr(any(not(doctest), feature = "nightly"), no_std)]
#![cfg_attr(feature = "nightly", feature(pattern))]
extern crate alloc as std;
use std::{
borrow::{Cow, ToOwned},
string::String,
};
/// This trait is a shim for the required functionality
/// normally provided directly by [`std::str::pattern::Patt... | the_stack |
use console::{style, Term};
use iml_agent::action_plugins::{
check_kernel, check_stonith, high_availability, kernel_module, lamigo, lpurge, lustre,
ntp::{action_configure, is_ntp_configured},
ostpool, package, postoffice,
stratagem::{
action_purge, action_warning,
server::{
g... | the_stack |
// Test cases derived from:
// https://github.com/Pybonacci/puntoflotante.org/blob/master/content/errors/NearlyEqualsTest.java
#[macro_use]
extern crate approx;
mod test_f32 {
use std::f32;
#[test]
fn test_basic() {
assert_abs_diff_eq!(1.0f32, 1.0f32);
assert_abs_diff_ne!(1.0f32, 2.0f32);... | the_stack |
use color::Color;
use form::{self, Form};
use graphics::character::CharacterCache;
use graphics::{Context, Graphics, Transformed};
use self::Three::{P, Z, N};
use std::path::PathBuf;
use transform_2d;
/// An Element's Properties.
#[derive(Clone, Debug)]
pub struct Properties {
pub width: i32,
pub height: i32,... | the_stack |
use std::{
collections::{btree_map::Entry, BTreeMap, VecDeque},
num::NonZeroUsize,
ops::Deref,
sync::Arc,
time::Duration,
};
use time::{Time, TimeProvider};
use data_types::{
partition_metadata::PartitionAddr, sequence::Sequence, write_summary::WriteSummary,
};
use internal_types::freezable::{... | the_stack |
use super::{html, md, txt};
use crate::methods::{coerce::coerce, transform::Transform};
use eyre::Result;
use itertools::Itertools;
use once_cell::sync::Lazy;
use regex::Regex;
use stencila_schema::{
Article, BlockContent, CodeBlock, CodeChunk, CodeChunkCaption, CodeError, ImageObject, Node,
};
/// Decode a Jupyte... | the_stack |
use std::cmp::Ordering;
use std::hint::unreachable_unchecked;
use rle::Searchable;
use super::*;
use std::ops::AddAssign;
// TODO: All these methods should be unsafe and have safe wrappers in safe_cursor.
impl<E: ContentTraits, I: TreeMetrics<E>, const IE: usize, const LE: usize> UnsafeCursor<E, I, IE, LE> {
pub... | the_stack |
//! Convenience library that wraps around the VFS watcher.
use {
anyhow::{format_err, Error},
fuchsia_async::{DurationExt, TimeoutExt},
fuchsia_bluetooth::util::open_rdwr,
fuchsia_vfs_watcher::{WatchEvent, Watcher as VfsWatcher},
fuchsia_zircon as zx,
futures::{Future, TryStreamExt},
io_uti... | the_stack |
use baldrdash as bd;
use compile::{symbolic_function_name, wasm_function_name};
use cranelift_codegen::cursor::{Cursor, FuncCursor};
use cranelift_codegen::entity::{EntityMap};
use cranelift_codegen::ir;
use cranelift_codegen::ir::condcodes::IntCC;
use cranelift_codegen::ir::InstBuilder;
use cranelift_codegen::isa::Tar... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateEventIntegrationOutput {}
impl std::fmt::Debug for UpdateEventIntegrationOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatt... | the_stack |
use std::{collections::HashMap, ffi::CStr, io, mem, os::unix::io::RawFd, ptr, slice};
use thiserror::Error;
use libc::{
close, getsockname, nlattr, nlmsgerr, nlmsghdr, recv, send, setsockopt, sockaddr_nl, socket,
AF_NETLINK, AF_UNSPEC, ETH_P_ALL, IFLA_XDP, NETLINK_EXT_ACK, NETLINK_ROUTE, NLA_ALIGNTO,
NLA_F... | the_stack |
use crate::middleware::{Middleware, MiddlewareResult};
use async_trait::async_trait;
use crate::request::Request;
use crate::response::Response;
use crate::router::HttpRouter;
use hyper::{Method, StatusCode};
use crate::router::{Matcher, FORMAT_PARAM};
/// A Route is the basic data structure that stores both the path... | the_stack |
use crate::structure::matrix::{Matrix, Shape, matrix};
use crate::traits::fp::FPVector;
use crate::util::non_macro::zeros_shape;
use std::ops::{Add, Sub, Mul, Div};
/// Syntactic sugar for Vector operations
pub trait VecOps: Sized + FPVector
where Self::Scalar: Copy + Clone
+ Add<Self::Scalar, Output=Self::Scalar... | the_stack |
use super::{CRCBuilder, CRC};
use crate::checksum::CheckReverserError;
use crate::endian::{bytes_to_int, int_to_bytes, wordspec_combos, Endian, WordSpec};
use crate::utils::{cart_prod, unresult_iter};
use delsum_poly::*;
#[cfg(feature = "parallel")]
use rayon::prelude::*;
use std::convert::TryInto;
use std::pin::Pin;
... | the_stack |
use alloc::sync::Arc;
use ::qlib::mutex::*;
use core::ops::Deref;
use alloc::collections::btree_map::BTreeMap;
use alloc::string::String;
use core::fmt::Debug;
use super::super::PAGE_MGR;
use super::super::qlib::auth::userns::*;
use super::super::qlib::auth::*;
use super::super::qlib::auth::id::*;
use super::super::ql... | the_stack |
use crate::tools::*;
use whitebox_vector::*;
use std::env;
use std::io::{Error, ErrorKind};
use std::path;
/// Combines two or more input vectors of the same ShapeType creating a single, new output
/// vector. Importantly, the attribute table of the output vector will contain the ubiquitous
/// file-specific FID, the ... | the_stack |
// Copyright 2020 Parity Technologies (UK) Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, mer... | the_stack |
use bytes::Bytes;
use thiserror::Error;
use crate::{connection::send_buffer::SendBuffer, frame, VarInt};
#[derive(Debug)]
pub(super) struct Send {
pub(super) max_data: u64,
pub(super) state: SendState,
pub(super) pending: SendBuffer,
pub(super) priority: i32,
/// Whether a frame containing a FIN b... | the_stack |
use std::error::Error;
use std::sync::Arc;
use bytes::Bytes;
use derive_more::Constructor;
use overlord::types::SignedProposal;
use overlord::{Codec, Crypto};
use rlp::Encodable;
use common_crypto::Secp256k1PrivateKey;
use core_consensus::util::OverlordCrypto;
use core_mempool::MsgPullTxs;
use protocol::traits::Messa... | the_stack |
use oatie::doc::*;
use oatie::rtf::RtfSchema;
use oatie::validate::validate_doc;
use std::mem;
#[derive(Debug)]
pub struct ClientDoc {
pub doc: Doc<RtfSchema>,
pub version: usize,
pub client_id: String,
pub original_doc: Doc<RtfSchema>,
pub pending_op: Option<Op<RtfSchema>>,
pub local_op: Op<R... | the_stack |
use crate::prelude::*;
use serde::Deserialize;
use serde::Serialize;
use shrinkwraprs::Shrinkwrap;
// ===============
// === Message ===
// ===============
/// All JSON-RPC messages bear `jsonrpc` version number.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[derive(Shrinkwrap)]
pub struct Message<T>... | the_stack |
use crate::prelude::*;
use std::net::SocketAddr;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::time::Duration;
use anyhow::Result;
use warp::filters::BoxedFilter;
use warp::{self, Filter, Future};
use crate::bookmark;
use crate::datastore::Datastore;
use crate::elastic;
use crate::eve::filters... | the_stack |
use std::cmp::{PartialOrd, Ordering, min};
use std::collections::{HashMap, BinaryHeap};
use std::io::Write;
use std::mem;
use std::net::SocketAddr;
use std::sync::{Arc, Mutex};
use std::time::{Instant, Duration};
use serde_cbor::from_slice;
use serde_cbor::ser::to_writer;
use futures::{Future, Async, Stream};
use quic... | the_stack |
use qt_widgets::q_abstract_item_view::SelectionMode;
use qt_widgets::QAction;
use qt_widgets::QDockWidget;
use qt_widgets::QLineEdit;
use qt_widgets::QMainWindow;
use qt_widgets::QMenu;
use qt_widgets::QPushButton;
use qt_widgets::QTreeView;
use qt_widgets::QWidget;
use qt_gui::QStandardItemModel;
use qt_core::{CaseS... | the_stack |
use std::collections::HashMap;
use std::collections::HashSet;
use std::ffi::OsStr;
use std::io::Write;
use std::path::Path;
use std::process::exit;
use chrono::prelude::Local;
use itertools::Itertools;
use structopt::StructOpt;
mod args;
mod cargo;
mod cmd;
mod config;
mod error;
mod git;
mod replace;
mod shell;
mod ... | the_stack |
use crate::mock;
use rand::{thread_rng, Rng};
const CHINESE_CHARS: [char; 500] = [
'的', '一', '是', '在', '不', '了', '有', '和', '人', '这', '中', '大', '为', '上', '个', '国',
'我', '以', '要', '他', '时', '来', '用', '们', '生', '到', '作', '地', '于', '出', '就', '分',
'对', '成', '会', '可', '主', '发', '年', '动', '同', '工', '也', '能', '下',... | the_stack |
use std::thread;
use slog;
use erdos::{
self,
dataflow::{
message::*,
stream::{
errors::{ReadError, TryReadError, WriteStreamError},
ExtractStream, IngestStream, WriteStreamT,
},
Operator, OperatorConfig, ReadStream, WriteStream,
},
node::Node,
... | the_stack |
use crate::Tag;
use super::{Encoding, MaskInfo};
pub const PRIMARY_SHIFT: u32 = 3;
pub const HEADER_SHIFT: u32 = 8;
pub const HEADER_TAG_SHIFT: u32 = 3;
// The primary tag is given by masking bits 1-3
pub const MASK_PRIMARY: u32 = 0b111;
// Header is composed of 3 primary tag bits, and 4 subtag bits
pub const MASK_H... | the_stack |
use std::collections::HashMap;
use std::process;
use std::sync::mpsc::Sender;
use std::sync::{Arc, Mutex, Once};
use log::{debug, info, warn};
use oci_spec::runtime::LinuxResources;
use containerd_shim as shim;
use shim::api::*;
use shim::event::Event;
use shim::protos::events::task::{
TaskCreate, TaskDelete, Ta... | the_stack |
use crate::{Message, State, Widget};
use crate::{Entity, Propagation};
use crate::{AsEntity, style::*};
use crate::{Event, WindowEvent};
use crate::tree::{TreeExt};
use morphorm::{LayoutType, PositionType, Units};
use std::rc::Rc;
/// To be replaced by [PropSet2]
pub trait PropSet: AsEntity + Sized {
/// Hel... | the_stack |
extern crate time;
extern crate serde_json;
extern crate bincode;
extern crate term_painter;
extern crate natord;
use unicode_segmentation::UnicodeSegmentation;
use indexes::{HashIndex, DistinctIter, DistinctIndex, WatchIndex, IntermediateIndex, MyHasher, AggregateEntry,
CollapsedChanges, RemoteIndex, R... | the_stack |
use std::str;
use std::slice;
#[cfg(feature = "color")]
macro_rules! colour {
($c:ident: $str:expr) =>
(colorify!($c: $str))
}
#[cfg(not(feature = "color"))]
macro_rules! colour {
($c:ident: $str:expr) =>
($str)
}
macro_rules! bracket {
($c:ident: $str:expr) =>
( concat!(colour!(white_... | the_stack |
use std::cell::UnsafeCell;
use std::sync::Mutex;
use std::vec::Vec;
use crate::plan::TraceLocal;
use crate::util::opaque_pointer::*;
use crate::util::{Address, ObjectReference};
use crate::vm::ReferenceGlue;
use crate::vm::VMBinding;
pub struct ReferenceProcessors {
soft: ReferenceProcessor,
weak: ReferencePr... | the_stack |
use std::os::unix::fs::FileExt;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use tracing::instrument;
use umash::Fingerprint;
use crate::chain_error;
use crate::chain_info;
use crate::chain_warn;
use crate::drop_result;
use crate::fresh_warn;
use crate::loader::is_well_known_fingerprint;
use crate::loader::Chu... | the_stack |
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateActivityError {
/// Kind of error that occurred.
pub kind: CreateActivityErrorKind,
/// Additional metadata about the error, including error code, message, and request ID.
pub(crate) meta: aws_smithy_types::Error,
}
/// Types of errors that c... | the_stack |
// DO NOT EDIT: This file is autogenerated by `examples/generate_histogram_bins.rs`
/// Histogram energies, i.e. energy at the center of each histogram bin.
pub static ENERGIES: [f64; 1000] = [
0.000000118604181294802408330460116465,
0.000000121366827574167330221758436329,
0.0000001241938241519922310120312... | the_stack |
use crate::graph::{Graph, GraphErr};
use crate::iterators::owning_iterator::OwningIterator;
use crate::iterators::vertices::VertexIter;
use crate::vertex_id::VertexId;
use hashbrown::HashMap;
use hashbrown::HashSet;
#[cfg(not(feature = "no_std"))]
use std::{
cmp::Ordering,
collections::{BinaryHeap, VecDeque},... | the_stack |
use crate::interpolator::StringInterpolator;
use lazy_static::*;
use regex::Regex;
use serde_json::Value;
use std::collections::HashMap;
use std::{borrow::Cow};
use std::fmt::Debug;
use thiserror::Error;
use tornado_common_api::{ValueGet};
mod interpolator;
pub const EXPRESSION_START_DELIMITER: &str = "${";
pub const... | the_stack |
use rand;
use rand::Rng;
use font::FONT_SET;
use CHIP8_HEIGHT;
use CHIP8_WIDTH;
use CHIP8_RAM;
const OPCODE_SIZE: usize = 2;
pub struct OutputState<'a> {
pub vram: &'a [[u8; CHIP8_WIDTH]; CHIP8_HEIGHT],
pub vram_changed: bool,
pub beep: bool,
}
enum ProgramCounter {
Next,
Skip,
Jump(usize),
... | the_stack |
use super::*;
use crate::{mock::*, EraBenefits};
use frame_support::{assert_ok, assert_noop};
use balances::NegativeImbalance;
#[test]
fn update_overall_info_should_work() {
new_test_ext().execute_with(|| {
Benefits::update_era_benefit(10u32.into(), 100);
assert_eq!(Benefits::current_benefits(), Er... | the_stack |
use std::{
collections::BTreeMap,
env, fs,
io::Write,
path::{Path, PathBuf},
process::Command,
str::from_utf8,
};
use anyhow::{anyhow, bail, Result};
use async_recursion::async_recursion;
use async_trait::async_trait;
use chrono::{DateTime, Duration, Utc};
use comrak::{markdown_to_html, ComrakO... | the_stack |
use std::{
cmp::{self, Ordering},
iter,
};
use crossterm::style::{Attribute, Attributes, Color};
use termwiz::{
cell::Intensity,
color::ColorSpec,
escape::{
csi::{Sgr, CSI},
Action,
},
};
use crate::{
style::{ContentStyle, StyledContent},
Dimensions, Line, Span,
};
pub... | the_stack |
use std::cell::UnsafeCell;
use std::fmt;
use std::fs::File;
use std::marker::PhantomData;
use std::mem::MaybeUninit;
use std::net::{TcpListener, TcpStream};
use std::ops::Neg;
use std::os::unix::io::{AsRawFd, FromRawFd};
use std::ptr::null_mut;
use std::slice::from_raw_parts_mut;
use std::sync::{atomic::*, *};
use std:... | the_stack |
use std::collections::HashMap;
use std::convert::TryFrom;
use std::io::Read;
use http::header::{HeaderMap, HeaderValue, CONTENT_TYPE};
use http::{Method, StatusCode};
use pulldown_cmark::{html, Options, Parser};
use ruma_client_api::r0::account::register::{self, Endpoint as RegisterEndpoint};
use ruma_client_api::r0::... | the_stack |
//! Support for [target runners](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner)
use crate::{
cargo_config::{CargoConfigs, Runner, TargetTriple},
errors::TargetRunnerError,
};
use camino::Utf8PathBuf;
use nextest_metadata::BuildPlatform;
use std::fmt;
use target_spec::Platform;
/// A... | the_stack |
#![allow(clippy::too_many_arguments)]
#![allow(clippy::cognitive_complexity)]
extern crate case;
extern crate clap;
extern crate colored;
extern crate git2;
extern crate heck;
extern crate rustache;
#[macro_use]
extern crate serde_derive;
extern crate tempdir;
extern crate time;
extern crate toml;
use case::*;
use co... | the_stack |
use proc_macro2::{LineColumn, Punct, Spacing, Span, TokenStream, TokenTree};
use syn::parse::ParseStream;
use syn::spanned::Spanned;
use syn::token;
use syn::{Result, Token};
use crate::ast::{Ast, Control, Delimiter, MatchArm};
use crate::cursor::Cursor;
use crate::encoder::Encoder;
use crate::requirements::Requiremen... | the_stack |
use wasm_bindgen::prelude::*;
use super::common::*;
use super::matrix3::*;
use super::vector3::*;
#[wasm_bindgen]
pub struct Quaternion(pub f32, pub f32, pub f32, pub f32);
#[wasm_bindgen]
impl Quaternion {
#[wasm_bindgen(getter)]
pub fn elements(&self) -> Box<[f32]> {
Box::new([self.0, self.1, self.... | the_stack |
use common::time_nsecs;
use libc;
use shm;
use std::collections::HashMap;
use std::fs::File;
use std::io::prelude::Write;
use std::mem::{size_of, size_of_val};
use std::sync::atomic::{AtomicU8, AtomicUsize, Ordering};
use std::sync::Mutex;
const MAX_DEBUGS: usize = 16;
// The assumption here is that a log entry consi... | the_stack |
extern crate alloc;
extern crate rangeset;
pub const MAX_CPUS: usize = 256;
// #[derive(Clone, Copy)]
#[derive(Clone)]
#[repr(C)]
pub struct BootloaderStruct {
/// If this is the BSP then this is a rangeset representing the free
/// physical memory on the system.
pub phys_memory: rangeset::RangeSet,
... | the_stack |
use crate::utils::BufferExt;
use serenity::{
cache::CacheRwLock,
model::{
channel::{Message, MessageType},
id::{MessageId, UserId},
},
};
use std::{cell::RefCell, ops::Deref, sync::Arc};
use weechat::Buffer;
/// MessageRenderer wraps a weechat buffer and facilitates editing the buffer and d... | the_stack |
use crate::{dep_types::Req, util};
use regex::Regex;
use std::{collections::HashMap, path::Path};
use std::{env, fs, process::Command};
use termcolor::Color;
// https://packaging.python.org/tutorials/packaging-projects/
/// Serialize to a python list of strings.
fn serialize_py_list(items: &[String], indent_level: u8... | the_stack |
use core::cmp::Ordering::{self, *};
use core::fmt::{self, Debug};
use core::ops::{Add, AddAssign, Div, Index, IndexMut, Mul, RangeBounds, Rem};
use core::ptr::NonNull;
use std::sync::{Arc, Weak};
use std::vec::Drain;
use hashbrown::HashMap;
use liblumen_core::locks::Mutex;
use liblumen_alloc::borrow::CloneToProcess... | the_stack |
extern crate sdl2;
use crate::consts::*;
use crate::cpu;
use crate::ram;
use anyhow::Result;
use sdl2::pixels::Color;
use sdl2::rect::{Point, Rect};
//const WIDTH: u16 = 256;
//const HEIGHT: u8 = 240;
const SCALE: u32 = 2;
const RED: Color = Color {
r: 0x64,
g: 0x00,
b: 0x00,
a: 0xFF,
};
const _GREEN:... | the_stack |
mod document_serializer;
mod value_serializer;
use std::io::Write;
use serde::{
ser::{Error as SerdeError, SerializeMap, SerializeStruct},
Serialize,
};
use self::value_serializer::{ValueSerializer, ValueType};
use super::{write_binary, write_cstring, write_f64, write_i32, write_i64, write_string};
use crat... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.