text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use syntax::{
ast::{edit::AstNodeEdit, make, AstNode, BlockExpr, ElseBranch, Expr, IfExpr, MatchArm},
NodeOrToken,
SyntaxKind::{COMMA, WHITESPACE},
};
use crate::{AssistContext, AssistId, AssistKind, Assists};
// Assist: move_guard_to_arm_body
//
// Moves match guard into match arm body.
//
// ```
// enum... | the_stack |
use std::any::Any;
use std::collections::VecDeque;
use std::future::Future;
use std::io::{self, ErrorKind, Read, Seek, SeekFrom, Write};
use std::os::unix::ffi::OsStrExt;
use std::os::unix::fs::DirBuilderExt;
use std::os::unix::fs::MetadataExt;
use std::os::unix::fs::OpenOptionsExt;
use std::os::unix::fs::PermissionsEx... | the_stack |
use super::util::{fq_grpc, to_snake_case, MethodType};
use derive_new::new;
use prost::Message;
use prost_build::{protoc, protoc_include, Config, Method, Service, ServiceGenerator};
use prost_types::FileDescriptorSet;
use std::io::{Error, ErrorKind, Read};
use std::path::Path;
use std::{fs, io, process::Command};
/// ... | the_stack |
const CONTINUATION_BIT: u8 = 1 << 7;
#[cfg(feature = "read-core")]
const SIGN_BIT: u8 = 1 << 6;
#[inline]
fn low_bits_of_byte(byte: u8) -> u8 {
byte & !CONTINUATION_BIT
}
#[inline]
#[allow(dead_code)]
fn low_bits_of_u64(val: u64) -> u8 {
let byte = val & u64::from(core::u8::MAX);
low_bits_of_byte(byte as ... | the_stack |
#![no_std]
extern crate utf8parse as utf8;
use core::mem;
mod table;
mod definitions;
use definitions::{Action, State, unpack};
use table::{EXIT_ACTIONS, ENTRY_ACTIONS, STATE_CHANGE};
impl State {
/// Get exit action for this state
#[inline(always)]
pub fn exit_action(&self) -> Action {
unsafe... | the_stack |
use core::cmp::Ordering;
use crate::set::SgSet;
use crate::tree::{Idx, IntoIter as TreeIntoIter, Iter as TreeIter};
use smallnum::SmallUnsigned;
use tinyvec::{ArrayVec, ArrayVecIterator};
// General Iterators ---------------------------------------------------------------------------------------------------
/// An ... | the_stack |
use std::collections::{HashMap, HashSet};
use std::iter::FromIterator;
use crate::{
error::*,
parse_tree::*,
type_engine::{look_up_type_id, AbiName, IntegerBits},
AstNode, AstNodeContent, CodeBlock, Declaration, Expression, ReturnStatement, TypeInfo,
WhileLoop,
};
use sway_types::Spanned;
use sway... | the_stack |
extern crate pom;
use pom::parser::{Parser,is_a,one_of,sym, none_of, call};
use pom::char_class::alpha;
use std::collections::{HashMap, HashSet};
use std::str::{self};
use std::fs::File;
use std::io::Read;
use self::pom::char_class::alphanum;
use self::pom::parser::{seq, take};
use std::path::Path;
use url::Url;
use c... | the_stack |
use crate::block::ItemContent;
use crate::block_store::{BlockStore, SquashResult, StateVector};
use crate::doc::Options;
use crate::event::{EventHandler, UpdateEvent};
use crate::id_set::DeleteSet;
use crate::types;
use crate::types::{BranchRef, Path, PathSegment, TypePtr, TypeRefs, TYPE_REFS_UNDEFINED};
use crate::upd... | the_stack |
use rustc_middle::mir;
use rustc_span::Symbol;
use rustc_target::spec::abi::Abi;
use crate::*;
use shims::foreign_items::EmulateByNameResult;
use shims::posix::fs::EvalContextExt as _;
use shims::posix::linux::sync::futex;
use shims::posix::sync::EvalContextExt as _;
use shims::posix::thread::EvalContextExt as _;
imp... | the_stack |
pub use self::alive_bitset::{intersect_alive_bitsets, write_alive_bitset, AliveBitSet};
pub use self::bytes::{BytesFastFieldReader, BytesFastFieldWriter};
pub use self::error::{FastFieldNotAvailableError, Result};
pub use self::facet_reader::FacetReader;
pub use self::multivalued::{MultiValuedFastFieldReader, MultiValu... | the_stack |
// collection of tests for the gossipsub network behaviour
#[cfg(test)]
mod tests {
use super::super::*;
// helper functions for testing
// This function generates `peer_no` random PeerId's, subscribes to `topics` and subscribes the
// injected nodes to all topics if `to_subscribe` is set. All nodes ... | the_stack |
use crate::dump::Output;
use crate::facts::{AllFacts, Loan, Origin, Point};
use crate::intern;
use crate::program::parse_from_program;
use crate::tab_delim;
use crate::test_util::{
assert_checkers_match, assert_equal, assert_outputs_match, location_insensitive_checker_for,
naive_checker_for, opt_checker_for,
};... | the_stack |
use crate::{Client, Response, Result};
use ethers_core::abi::{Abi, Address};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
/// Arguments for verifying contracts
#[derive(Debug, Clone, Serialize)]
pub struct VerifyContract {
pub address: Address,
pub source: String,
#[serde(rename = "c... | the_stack |
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectionError {
/// Kind of error that occurred.
pub kind: DeleteConnectionErrorKind,
/// Additional metadata about the error, including error code, message, and request ID.
pub(crate) meta: aws_smithy_types::Error,
}
/// Types of errors th... | the_stack |
use crate::ast::SrcSpan;
use crate::parse::error::{LexicalError, LexicalErrorType};
use crate::parse::token::Token;
use std::char;
#[derive(Debug)]
pub struct Lexer<T: Iterator<Item = (usize, char)>> {
chars: T,
pending: Vec<Spanned>,
chr0: Option<char>,
chr1: Option<char>,
loc0: usize,
loc1: u... | the_stack |
use crate::HashType;
use crate::HoloHash;
use holochain_serialized_bytes::SerializedBytes;
use holochain_serialized_bytes::SerializedBytesError;
use holochain_serialized_bytes::UnsafeBytes;
impl<T: HashType> serde::Serialize for HoloHash<T> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
whe... | the_stack |
use crate::sql_trace::SqlTraceComment;
use crate::{error::SqlError, model_extensions::*, query_builder::write, sql_info::SqlInfo, QueryExt};
use connector_interface::*;
use datamodel::common::preview_features::PreviewFeature;
use itertools::Itertools;
use prisma_models::*;
use prisma_value::PrismaValue;
use quaint::{
... | the_stack |
mod macros;
use glam::{Mat2, Mat3, Mat4, Quat, Vec2, Vec3, Vec4};
use nalgebra;
/// Trait used by the `assert_approx_eq` macro for floating point comparisons.
pub trait FloatCompare<Rhs: ?Sized = Self> {
/// Return true if the absolute difference between `self` and `other` is
/// less then or equal to `max_ab... | the_stack |
use std::fmt;
use std::sync::atomic::AtomicU16;
use std::sync::atomic::AtomicU32;
use std::sync::atomic::AtomicU8;
use std::sync::atomic::AtomicUsize;
use atomic::Ordering;
use crate::util::constants::BITS_IN_BYTE;
use crate::util::constants::BITS_IN_WORD;
use crate::util::constants::LOG_BITS_IN_BYTE;
use crate::util... | the_stack |
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
use core_foundation::array::{
kCFTypeArrayCallBacks, CFArray, CFArrayCallBacks, CFArrayGetCount, CFArrayGetValueAtIndex,
__CFArray,
};
use core_foundation::base::{
kCFAllocatorDefault, CFAllocatorRef, CFIndex, CFRel... | the_stack |
#[cfg(feature = "termcolor")]
pub extern crate termcolor;
extern crate typed_arena;
use std::borrow::Cow;
use std::fmt;
use std::io;
use std::ops::Deref;
#[cfg(feature = "termcolor")]
use termcolor::{ColorSpec, WriteColor};
mod render;
#[cfg(feature = "termcolor")]
pub use self::render::TermColored;
pub use self::re... | the_stack |
#![feature(bench_black_box, const_black_box, core_intrinsics, start)]
#![no_std]
#[panic_handler]
fn panic_handler(_: &core::panic::PanicInfo) -> ! {
core::intrinsics::abort();
}
/*
* Code
*/
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
use core::hint::black_box;
macro_rules! ch... | the_stack |
#![deny(missing_docs)]
//! A simple map based on a vector for small integer keys. Space requirements
//! are O(highest integer key).
// optional serde support
#[cfg(feature = "serde")]
#[macro_use]
extern crate serde;
use self::Entry::*;
use std::cmp::{Ordering, max};
use std::fmt;
use std::hash::{Has... | the_stack |
#![cfg(feature = "feat_selinux")]
use std::ffi::CString;
use std::path::Path;
use std::{io, iter, str};
use crate::common::util::*;
#[test]
fn version() {
new_ucmd!().arg("--version").succeeds();
new_ucmd!().arg("-V").succeeds();
}
#[test]
fn help() {
new_ucmd!().fails();
new_ucmd!().arg("--help").s... | the_stack |
use hdrhistogram::Histogram;
#[test]
fn iter_recorded_non_saturated_total_count() {
let mut h = Histogram::<u64>::new_with_bounds(1, u64::max_value(), 3).unwrap();
h.record(1).unwrap();
h.record(1_000).unwrap();
h.record(1_000_000).unwrap();
let expected = vec![1, 1_000, h.highest_equivalent(1_00... | the_stack |
use crate::context::Context;
use deno_ast::view as ast_view;
use deno_ast::view::NodeTrait;
pub trait Handler {
fn on_enter_node(&mut self, _n: ast_view::Node, _ctx: &mut Context) {}
fn on_exit_node(&mut self, _n: ast_view::Node, _ctx: &mut Context) {}
fn array_lit(&mut self, _n: &ast_view::ArrayLit, _ctx: &mut... | the_stack |
use std::{
borrow::Cow,
collections::HashMap,
convert::Into,
future::Future,
net::SocketAddr,
pin::Pin,
sync::Arc,
task::{Context, Poll},
};
use a2::client::{Client as ApnsClient, Endpoint};
use a2::CollapseId;
use futures::future::{BoxFuture, FutureExt};
use http::status::StatusCode;
u... | the_stack |
use std::collections::hash_map::{Entry, HashMap};
use std::convert::TryInto;
use std::env::args;
use std::fs::{File, OpenOptions};
use std::io::{self, stdin, Read, Stdin, Write};
use std::path::{Path, PathBuf};
use std::time::{Duration, SystemTime};
use std::{fmt, str};
fn main() {
let mut args = args().skip(1);
... | the_stack |
use std::fmt;
use arrayvec::ArrayVec;
use hashbrown::HashMap;
use smallvec::SmallVec;
use crate::{
dispatch::{
dispatcher::{SystemExecSend, SystemId},
util::check_intersection,
},
system::{RunningTime, System},
world::{ResourceId, World},
};
const MAX_SYSTEMS_PER_GROUP: usize = 5;
#[... | the_stack |
use crate::util::{error::STError, parser::*, paths::executable_join, stateful::Named};
use std::cmp::Ordering;
use std::process;
use std::collections::HashMap;
use std::io::{BufRead, BufReader, Write};
use serde::{Deserialize, Serialize};
const STEAM_CDN: &str = "https://steamcdn-a.akamaihd.net/steamcommunity/publi... | the_stack |
// Find the repo and more explanation at github.com/makepad/makepad.
// We are developing the UI kit and code-editor as MIT, but the full stack
// will be a cloud/native app product in a few months.
// However to get to this amazing mixed-mode code editing-designtool,
// we first have to build an actually nice code ed... | the_stack |
pub mod common;
pub use chrono::offset::Utc;
pub use common::{bakery_chain::*, setup::*, TestContext};
pub use rust_decimal::prelude::*;
pub use rust_decimal_macros::dec;
pub use sea_orm::{entity::*, query::*, DbErr, FromQueryResult};
pub use uuid::Uuid;
// Run the test locally:
// DATABASE_URL="mysql://root:@localho... | the_stack |
use crate::controller::domain_handle::DomainHandle;
use crate::controller::inner::{graphviz, DomainReplies};
use crate::controller::keys;
use crate::controller::{Worker, WorkerIdentifier};
use dataflow::payload::{ReplayPathSegment, SourceSelection, TriggerEndpoint};
use dataflow::prelude::*;
use std::collections::{BTre... | the_stack |
use std::str::FromStr;
use crate::types::{
AddAccountPayload, GenerateMultiSigAccountPayload, GetMultiSigAccountPayload,
MultiSigPermission, RemoveAccountPayload, SetAccountWeightPayload, SetThresholdPayload,
UpdateAccountPayload,
};
use super::*;
#[test]
fn test_generate_multi_signature() {
let cycl... | the_stack |
use crate::objects::{SignedProposal, SignedVote, VoteType};
use crate::{Address, Block, Hash, Height, Round};
use std::collections::HashMap;
use crate::error::{BftError, BftResult};
use lru_cache::LruCache;
pub(crate) const CACHE_N: u64 = 16;
/// BFT vote collector
#[derive(Debug, Clone)]
pub(crate) struct VoteColl... | the_stack |
use crate::dev_prelude::Local;
use building_blocks_core::prelude::*;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
/// Arbitrarily chosen. Certainly can't exceed the number of bits in an i32.
pub const MAX_LODS: usize = 20;
/// Calculates chunk locations, e.g. minimums and downsampling destinations... | the_stack |
use super::{
read::{BorrowReader, Reader},
BorrowDecode, BorrowDecoder, Decode, Decoder,
};
use crate::{
config::{
Endian, IntEncoding, InternalArrayLengthConfig, InternalEndianConfig,
InternalIntEncodingConfig,
},
error::{DecodeError, IntegerType},
};
use core::{
any::TypeId,
... | the_stack |
//! Macros and functions for working with
//! [`ioctl`](http://man7.org/linux/man-pages/man2/ioctl.2.html).
use std::os::raw::{c_int, c_ulong, c_void};
use std::os::unix::io::AsRawFd;
/// Expression that calculates an ioctl number.
///
/// ```
/// # #[macro_use] extern crate vmm_sys_util;
/// # use std::os::raw::c_ui... | the_stack |
use crate::cli_utils::setup_ctrlc_handler;
use crate::data_block_buffer::{DataBlockBuffer, InputType, OutputType, Slot};
use crate::file_reader::{FileReader, FileReaderParam};
use crate::file_utils;
use crate::file_writer::{FileWriter, FileWriterParam};
use crate::general_error::Error;
use crate::json_printer::{Bracket... | the_stack |
use std::{fmt, collections::BTreeMap};
use combine::{parser, ParseResult, Parser};
use combine::easy::Error;
use combine::error::StreamError;
use combine::combinator::{many, many1, optional, position, choice};
use crate::tokenizer::{Kind as T, Token, TokenStream};
use crate::helpers::{punct, ident, kind, name};
use c... | the_stack |
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
use std::time::Duration;
use crate::Bus;
use anyhow::Context;
use boringtun::noise::{Tunn, TunnResult};
use log::Level;
use smoltcp::wire::{IpProtocol, IpVersion, Ipv4Packet, Ipv6Packet};
use tokio::net::UdpSocket;
use crate::config::{Config, PortProtocol};
use ... | the_stack |
const MINIMUM_PRECISION: i32 = 10;
/** The largest precision for which threshold and bias corrections are precisely defined. */
const MAXIMUM_PRECISION: i32 = 18;
/// Returns the estimate threshold below which we believe LinearCounting will return more accurate
/// results than the HyperLogLog algorithm. Both algorit... | the_stack |
use hyper::client::{Client, Response, RequestBuilder as NetRequestBuilder};
use hyper::header::{Headers, Header, HeaderFormat, ContentType};
use hyper::method::Method as HyperMethod;
use url::Url;
use url::form_urlencoded::Serializer as FormUrlEncoded;
use url::percent_encoding::{utf8_percent_encode, DEFAULT_ENCODE_SE... | the_stack |
use super::PurchaseOrderStoreOperations;
use crate::commits::MAX_COMMIT_NUM;
use crate::error::InternalError;
use crate::paging::Paging;
use crate::purchase_order::store::diesel::{
models::{PurchaseOrderModel, PurchaseOrderVersionModel, PurchaseOrderVersionRevisionModel},
schema::{purchase_order, purchase_order... | the_stack |
extern crate criterion;
use criterion::Criterion;
use graphlib::*;
// use `cargo bench --features sbench` for benching with GraphCapacity of 10_000_000
// includes benches for :
// 1. new() -> Graph<T>
// 2. with_capacity(capacity: usize) -> Graph<T>
fn bench_create(c: &mut Criterion) {
c.bench_function("new", |... | the_stack |
use std::{
cell::{Cell, RefCell},
ffi::OsString,
io::Read,
mem,
os::unix::io::AsRawFd,
rc::Rc,
thread,
time::Duration,
};
use nix::fcntl::{fcntl, FcntlArg, OFlag};
use os_pipe::pipe;
use wayland_protocols::wlr::unstable::data_control::v1::server::{
zwlr_data_control_device_v1::{Requ... | the_stack |
use std::{collections::hash_map::DefaultHasher, hash::Hasher, iter, mem};
use proc_macro2::TokenStream;
use quote::format_ident;
#[cfg(feature = "type_analysis")]
use syn::Type;
use syn::{
parse::{Parse, ParseStream},
parse_quote, Attribute, Error, Expr, Ident, ItemEnum, Macro, Path, Result, Token,
};
use sup... | the_stack |
//! Multi-producer, single-consumer FIFO queue communication primitives.
pub use std::sync::mpsc::{TrySendError, SendError, TryRecvError, RecvError};
use std::sync::mpsc;
use std::sync::{Arc, Mutex};
use coroutine::HandleList;
use runtime::Processor;
use scheduler::Scheduler;
#[derive(Clone)]
pub struct Sender<T> {... | the_stack |
use std::time::SystemTime;
use bytes::Bytes;
use proptest::prelude::*;
use uuid::Uuid;
//
// Bytes
//
pub fn bytes(size: usize) -> impl Strategy<Value = Bytes> {
proptest::collection::vec(any::<u8>(), size).prop_map(Bytes::from)
}
//
// Uuid
//
prop_compose! {
pub fn uuids()(
int in any::<u128>()
... | the_stack |
use std::{mem, cmp, thread};
use std::str::{self, FromStr};
use std::net::SocketAddr;
use std::io::{Read, Write};
use std::collections::VecDeque;
use std::collections::hash_map::Entry;
use std::sync::{Arc, Mutex};
use std::time::Duration;
use spin::RwLock as SpinRwLock;
use mio::tcp::{TcpStream, TcpListener};
use mio::... | the_stack |
use failure::{format_err, Error};
use futures::future::Fuse;
use futures::prelude::*;
use futures::select;
use lazy_static::*;
use log::{debug, trace};
use regex::Regex;
use rpassword::prompt_password_stdout;
use rustyline as rl;
use serde::ser::Serialize;
use std::fmt;
use std::io::stdin;
use std::path::PathBuf;
use s... | the_stack |
use super::*;
use crate::domain::*;
use opendatafabric::*;
use chrono::Utc;
use dill::*;
use std::collections::HashSet;
use std::collections::LinkedList;
use std::convert::TryFrom;
use std::convert::TryInto;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use url::Url;
////////////////////////////////////////////... | the_stack |
use crate::component::datatype::DataType;
use crate::component::table::Row;
use crate::storage::diskinterface::TableMeta;
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use std::fmt;
use std::io;
use std::num;
use std::string;
#[derive(Debug, Clone)]
pub struct BytesCoder {
/* definition */
// Ideally, B... | the_stack |
use std::cmp::Ordering;
use std::collections::{BTreeSet, HashMap, HashSet};
use serde::Serialize;
use bitcoin::{Address, OutPoint, Txid};
use crate::types::{MempoolEntry, ScriptHash, TxStatus};
use crate::util::{descriptor::ExtendedDescriptor, remove_if, xpub::Bip32Origin};
use crate::wallet::KeyOrigin;
#[cfg(featu... | the_stack |
use crate::parser::bind_rules::{statement_block, Statement, StatementBlock};
use crate::parser::common::{
compound_identifier, many_until_eof, map_err, using_list, ws, BindParserError,
CompoundIdentifier, Include, NomSpan,
};
use nom::{
bytes::complete::{escaped, is_not, tag},
character::complete::{char... | the_stack |
use super::events::{ConfigType, Event, EventBody, EventProvider, Result, WordWrapMode};
use crate::config::Config;
use crate::icons::*;
use chrono::prelude::*;
use core::time::Duration;
use std::collections::HashMap;
#[derive(serde_derive::Deserialize, serde_derive::Serialize, Clone, Debug)]
pub struct StackExchangeCo... | the_stack |
use futures::Future;
use futures_cpupool::CpuPool;
use scopeguard;
use config::defaults::{default_cpu_pool, default_lanes};
use config::{Backend, HasherConfig, Variant, Version};
use input::{AdditionalData, Container, Password, Salt, SecretKey};
use output::HashRaw;
use {Error, ErrorKind};
impl<'a> Default for Hasher... | the_stack |
pub use errors;
use errors::{DeliveryError, Kind};
use std::clone::Clone;
use std::default::Default;
use std::fs::File;
use std::io::prelude::*;
use std::path::{Path, PathBuf};
use toml;
use types::DeliveryResult;
use utils::path_ext::{is_dir, is_file};
use utils::path_join_many::PathJoinMany;
use utils::{mkdir_recursi... | the_stack |
use std::cell::RefCell;
use std::ops::Range;
use std::rc::Rc;
use super::bus::CpuBusDevice;
use super::cartridge::Cartridge;
#[derive(Default, Clone)]
pub struct CtrlReg {
pub nametable_x: bool, // 0
pub nametable_y: bool, // 1
pub increment: bool, // 2
pub pattern_sprite: bool,... | the_stack |
pub mod assets;
pub mod bonds;
pub mod options;
pub mod basket;
use instruments::assets::Currency;
use instruments::assets::CreditEntity;
use instruments::assets::Equity;
use instruments::bonds::ZeroCoupon;
use instruments::basket::Basket;
use instruments::options::SpotStartingEuropean;
use instruments::options::Forwa... | the_stack |
use crate::authority::AuthorityState;
use crate::checkpoints::CheckpointLocals;
use crate::checkpoints::ConsensusSender;
use arc_swap::ArcSwapOption;
use bytes::Bytes;
use futures::stream::FuturesUnordered;
use futures::StreamExt;
use multiaddr::Multiaddr;
use narwhal_executor::SubscriberResult;
use narwhal_types::Tran... | the_stack |
extern crate oxygengine_procedural as procedural;
mod data_aggregator;
use data_aggregator::*;
use minifb::{Key, KeyRepeat, MouseMode, Scale, Window, WindowOptions};
use procedural::prelude::*;
use std::f64::consts::PI;
const SIZE: usize = 100;
const ALTITUDE_LIMIT: Scalar = 200.0;
const HUMIDITY_LIMIT: Scalar = 0.2... | the_stack |
use super::cli::{LocationInformation, PrintableMessage, RuntimeConfig};
use crate::typescript;
use graphql_parser::query::{Definition, Document, FragmentDefinition, OperationDefinition};
use schema::Schema;
use std::collections::{HashMap, HashSet};
use std::fs::File;
use std::io::{BufReader, Read};
use std::path::{Path... | the_stack |
use core::panic::PanicInfo;
use ntapi::{ntdbg::*, ntioapi::*, ntrtl::*, ntzwapi::*, winapi::shared::ntdef::*};
use utf16_lit::utf16_null;
use winapi::um::winnt::{
IMAGE_DOS_HEADER, IMAGE_DOS_SIGNATURE, IMAGE_NT_HEADERS64, IMAGE_SECTION_HEADER,
};
pub mod log;
// Looks like core:: needs this.
// See: https://githu... | the_stack |
extern crate sqlparser;
use crate::engine::Query;
use crate::engine::*;
use crate::ingest::raw_val::RawVal;
use crate::syntax::expression::Expr;
use crate::syntax::expression::*;
use crate::syntax::limit::*;
use crate::QueryError;
use sqlparser::ast::{Expr as ASTNode, *};
use sqlparser::dialect::GenericDialect;
use sq... | the_stack |
use super::{ButtplugDeviceResultFuture, ButtplugProtocol, ButtplugProtocolCommandHandler};
use crate::{
core::{
errors::ButtplugError,
messages::{
self, ButtplugDeviceCommandMessageUnion, ButtplugDeviceMessage, DeviceMessageAttributesMap,
VibrateCmd, VibrateSubcommand,
},
},
device::{
... | the_stack |
use super::{
FileTransfer, FileTransferError, FileTransferErrorType, FileTransferResult, ProtocolParams,
};
use crate::fs::{FsDirectory, FsEntry, FsFile, UnixPex};
use crate::utils::fmt::shadow_password;
use crate::utils::path;
// Includes
use std::convert::TryFrom;
use std::io::{Read, Write};
use std::path::{Path... | the_stack |
use std::collections::BTreeMap;
use crate::toml_edit::{Document, Item, Table, Value};
/// Each `Matcher` field when matched to a heading or key token
/// will be matched with `.contains()`.
pub struct Matcher<'a> {
/// Toml headings with braces `[heading]`.
pub heading: &'a [&'a str],
/// Toml heading wit... | the_stack |
use std::collections::VecDeque;
use std::net::SocketAddr;
use std::sync::Arc;
use std::time::{Duration, Instant};
use futures::{Future, Async};
use futures_cpupool::CpuFuture;
use valuable_futures::{StateMachine, Async as VAsync};
use tokio_core::reactor::Timeout;
use tk_easyloop::timeout;
use blocks::BlockHash;
use ... | the_stack |
use anyhow;
use json5format::*;
use std::mem::discriminant;
/// A recursive function that takes in two references to `json5format::Value`s,
/// and modifies the second one to incorporate comments contained in the first.
/// The function does a depth-first search of the JSON5 tree structure,
/// transferring comments f... | the_stack |
use {crate::compression_parameters::CCtxParams, std::marker::PhantomData};
/// Safe wrapper for ZSTD_CDict instances.
pub struct CDict<'a> {
ptr: *mut zstd_sys::ZSTD_CDict,
_phantom: PhantomData<&'a ()>,
}
impl<'a> CDict<'a> {
// TODO annotate lifetime of data to ensure outlives Self
pub fn from_data(... | the_stack |
//
// Copyright (c) 2018 Stegos AG
//
// 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, merge, publish, ... | the_stack |
#![deny(missing_docs)]
#![doc = include_str!("../README.md")]
use std::{
env,
fs::{self, File},
io::{Cursor, Read, Write},
path::{Path, PathBuf},
process::Command,
};
use cargo_metadata::{MetadataCommand, Package};
use risc0_zkvm_platform_sys::LINKER_SCRIPT;
use risc0_zkvm_sys::{make_method_id_fro... | the_stack |
//! Opcodes
//!
//! Bitcoin's script uses a stack-based assembly language. This module defines
//! all of the opcodes
//!
#![allow(non_camel_case_types)]
#[cfg(feature = "serde")] use serde;
// Heavy stick to translate between opcode types
use std::mem::transmute;
use consensus::encode::{self, Decoder, Encoder};
us... | the_stack |
//! Get info on your team's private channels.
pub use crate::mod_types::groups_types::*;
use crate::requests::SlackWebRequestSender;
/// Archives a private channel.
///
/// Wraps https://api.slack.com/methods/groups.archive
pub async fn archive<R>(
client: &R,
token: &str,
request: &ArchiveRequest<'_>,
)... | the_stack |
//! Runtime support to link with/use libpthread
use alloc::boxed::Box;
use core::ops::Add;
use core::ptr;
use core::ptr::NonNull;
use core::sync::atomic::{AtomicI32, AtomicUsize, Ordering};
use hashbrown::HashMap;
use lazy_static::lazy_static;
use log::{debug, error, info, trace, warn};
use lineup::threads::ThreadId... | the_stack |
use crate::controller::{Controller, Direction};
use crate::gophermap::{GopherMapEntry, ItemType};
use crate::ui::{dialogs, layout::Layout, statusbar::StatusBar};
use cursive::{
event::Key,
menu::MenuTree,
view::{Nameable, Resizable, Scrollable},
views::{Dialog, NamedView, OnEventView, ResizedView, Scrol... | the_stack |
//! Provides the schema objects as defined by the TUF spec.
mod de;
pub mod decoded;
mod error;
mod iter;
pub mod key;
mod spki;
mod verify;
use crate::schema::decoded::{Decoded, Hex};
pub use crate::schema::error::{Error, Result};
use crate::schema::iter::KeysIter;
use crate::schema::key::Key;
use crate::sign::Sign;... | the_stack |
use std::mem;
use std::os::raw::{c_char, c_int, c_void};
use std::ptr;
#[allow(non_upper_case_globals)]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
pub mod bindings;
pub const LUA_OK: c_int = bindings::LUA_OK as c_int;
pub const LUA_YIELD: c_int = bindings::LUA_YIELD as c_int;
pub const LUA_ERRRUN: c_int ... | the_stack |
use crate::ffi::sodium;
use crate::traits::*;
use std::cell::Cell;
use std::fmt::{self, Debug};
use std::ptr::NonNull;
use std::slice;
use std::thread;
/// The page protection applied to the memory underlying a [`Box`].
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum Prot {
/// Any attempt to read, write, or ex... | the_stack |
use std::io::{self, Read, Write};
use thiserror::Error;
use fuchsia_trace as ftrace;
use fuchsia_zircon as zx;
use crate::{Fixed, NewId, ObjectId};
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum ArgKind {
Int,
Uint,
Fixed,
String,
Object,
NewId,
Array,
Handle,
}
#[derive(Debu... | the_stack |
use std::{collections::HashMap, env, sync::Arc};
use anyhow::{bail, Result};
use async_recursion::async_recursion;
use reqwest::{header, Body, Client, Method, Request, StatusCode, Url};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use serde_json::Value;
/// Endpoint for the Slack API.
const ENDPOINT... | the_stack |
use std::borrow::Cow;
use std::collections::HashMap;
use std::io::Write;
use serde_json::{to_string_pretty, to_value, Number, Value};
use crate::context::{ValueRender, ValueTruthy};
use crate::errors::{Error, Result};
use crate::parser::ast::*;
use crate::renderer::call_stack::CallStack;
use crate::renderer::for_loop... | the_stack |
use std::net::{TcpListener, TcpStream, SocketAddr, Shutdown};
use std::sync::{mpsc, Arc, Mutex};
use std::io::prelude::*;
use std::str;
use std::time::Duration;
use std::collections::HashMap;
use makepad_microserde::*;
use makepad_http::httputil::*;
use makepad_http::channel::*;
#[derive(Debug, Clone, SerBin, DeBin, P... | the_stack |
pub mod context;
pub mod macros;
use crate::prelude::*;
use crate::generate::context::CalledMethodInfo;
use crate::node;
use crate::node::InsertionPointType;
use crate::node::Payload;
use crate::ArgumentInfo;
use crate::Node;
use crate::SpanTree;
use ast::assoc::Assoc;
use ast::crumbs::Located;
use ast::opr::General... | the_stack |
use std::cmp::min;
use std::future::Future;
use std::os::unix::io::AsRawFd;
use std::pin::Pin;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex, TryLockError};
use std::time::{Duration, Instant};
use std::{io, task};
use heph_inbox as inbox;
use log::{debug, error, trace};
use mio::unix::Sour... | the_stack |
use rayon_core::join;
use super::IndexedParallelIterator;
use std::cmp;
use std::usize;
pub trait ProducerCallback<T> {
type Output;
fn callback<P>(self, producer: P) -> Self::Output where P: Producer<Item = T>;
}
/// A producer which will produce a fixed number of items N. This is
/// not queryable through ... | the_stack |
//! Support for capturing a stack backtrace of an OS thread
//!
//! This module contains the support necessary to capture a stack backtrace of a
//! running OS thread from the OS thread itself. The `Backtrace` type supports
//! capturing a stack trace via the `Backtrace::capture` and
//! `Backtrace::force_capture` func... | the_stack |
use crate::config::MintConfig;
use crate::db::{
NonceKey, OutputOutcomeKey, ProposedPartialSignatureKey, ProposedPartialSignaturesKeyPrefix,
ReceivedPartialSignatureKey, ReceivedPartialSignatureKeyOutputPrefix,
ReceivedPartialSignaturesKeyPrefix,
};
use async_trait::async_trait;
use itertools::Itertools;
us... | the_stack |
use super::Dispatch;
use crate::widget::layout::compute_node_layout;
use crate::{AttribKey, Backend, Component, Node};
use expanse::geometry::Size;
use expanse::number::Number;
use gio::{prelude::*, ApplicationFlags};
pub use gtk;
use gtk::{
prelude::*, Application, ApplicationWindow, Button, CheckButton, Container... | the_stack |
use crate::alloc::alloc::{alloc, dealloc, Layout};
use crate::alloc::vec::Vec;
use core::any::TypeId;
use core::ptr::{self, NonNull};
use hashbrown::hash_map::Entry;
use crate::archetype::{TypeIdMap, TypeInfo};
use crate::{align, Component, DynamicBundle};
/// Helper for incrementally constructing a bundle of compon... | the_stack |
use crate::error::Result;
use protobuf::rt::ProtobufVarint;
use protobuf::{wire_format, CodedInputStream, CodedOutputStream};
use std::convert::TryFrom;
/// This is actually an enum from .proto file. This is the only place that would require `protoc`,
/// so we choose to store the value directly and avoid a heavy depe... | the_stack |
use crate::Call;
use crate::CallInterface;
use candid::{CandidType, Deserialize, Encode, Principal};
use std::convert::TryFrom;
/// Creates a new canister.
///
/// Example usage:
///
/// ```
/// use ic_universal_canister::{wasm, management, CallInterface};
///
/// // Create a new canister with some cycles.
/// wasm().... | the_stack |
use crate::assemble_asset::LatexmlStatus;
use crate::constants::{AR5IV_CSS_URL, DOC_NOT_FOUND_TEMPLATE, SITE_CSS_URL};
use regex::{Captures, Regex};
use std::borrow::Cow;
use unicode_segmentation::UnicodeSegmentation;
lazy_static! {
static ref END_ARTICLE: Regex = Regex::new("</article>").unwrap();
static ref END_... | the_stack |
extern crate fuse;
extern crate libc;
extern crate time;
extern crate xattr;
use std::ffi::{CStr, CString, OsStr, OsString};
use std::fmt;
use std::os::unix::ffi::{OsStrExt, OsStringExt};
use std::io;
use std::mem::MaybeUninit;
use std::path::Path;
#[cfg(not(target_os = "macos"))]
use std::ptr;
use std::os::unix::io::... | the_stack |
use crate::rand;
use crate::server::ProducesTickets;
use crate::Error;
use ring::aead;
use std::mem;
use std::sync::{Arc, Mutex, MutexGuard};
use std::time;
/// The timebase for expiring and rolling tickets and ticketing
/// keys. This is UNIX wall time in seconds.
///
/// This is guaranteed to be on or after the UN... | the_stack |
use std::collections::HashMap;
use std::fs::File;
use std::io::{BufRead, BufReader, Read};
use std::mem;
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Once;
use libc;
macro_rules! debug {
($($args:expr),*) => ({
if false {
//if true {
pr... | the_stack |
use std::{
fmt::Debug,
hash::Hash,
sync::Arc,
};
use core_extensions::SelfOps;
use crate::{
*,
std_types::{RBox,RString,RStr,RArc,ROption,Tuple1,Tuple2,Tuple3},
sabi_trait::prelude::*,
};
//////////////////////////////////////
/**
```
use abi_stable::{
sabi_trait::{prelude::*,examples::... | the_stack |
use crate::backend::HostInterface;
use crate::buffer::AudioBufferInOut;
use crate::event::{ContextualEventHandler, RawMidiEvent, SysExEvent, Timed};
use crate::{
AudioHandler, AudioHandlerMeta, CommonAudioPortMeta, CommonPluginMeta, ContextualAudioRenderer,
};
use core::cmp;
use vecstorage::VecStorage;
/// Re-expo... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.