text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
//! A row or column with sizes adjustable via dividing handles use log::warn; use std::ops::{Index, IndexMut}; use super::DragHandle; use kas::dir::{Down, Right}; use kas::event; use kas::layout::{self, RulesSetter, RulesSolver}; use kas::prelude::*; /// A generic row widget /// /// See documentation of [`Splitter`]...
the_stack
use maxgraph_store::api::*; use maxgraph_store::schema::prelude::Relation; use maxgraph_store::api::prelude::Property; use maxgraph_common::proto::store_api::{GetVertexsRequest, BatchVertexEdgeRequest, BatchVertexEdgeResponse, BatchVertexCountResponse, GetOutEdgesRequest, GetInEdgesRequest}; use dataflow::message::{Ra...
the_stack
//! Fake queue for simulating driver interactions in unittests //! //! To facilitate writing unittests it is useful to manipulate the queues from the perspective of a //! a driver. This module contains helpers that allow for: //! * Building simple descriptor chains //! * Publishing the build descriptors in the availa...
the_stack
use crate::db_connectors::{conversations::*, memories::*, state}; use crate::interpreter_actions::SwitchBot; use crate::{ data::{ConversationInfo, CsmlRequest, Database, EngineError}, utils::{ get_default_flow, get_flow_by_id, get_low_data_mode_value, get_ttl_duration_value, search_flow, send_ms...
the_stack
use core::cmp; use core::convert::TryFrom; use core::fmt::{self, Debug, Display, Write}; use core::mem; use core::ptr; use core::slice; use core::str::{self, Utf8Error}; use std::os::raw::c_uint; use hashbrown::HashMap; use lazy_static::lazy_static; use thiserror::Error; use liblumen_arena::DroplessArena; use libl...
the_stack
use super::*; use crate::linking::LinkingConfiguration; use std::{ borrow::Borrow, cmp::Ordering, collections::{BTreeMap, BTreeSet, HashMap}, error, fmt, io::{self}, path::{Path, PathBuf}, }; type ReturnRange = std::ops::Range<usize>; type ReturnRangeMap<'a> = fxhash::FxHashMap<&'a Path, Return...
the_stack
use super::command::Command; use super::geometry::*; use super::path_builder::*; use super::segment::*; use super::style::*; use core::borrow::Borrow; use crate::lib::Vec; pub fn stroke_into<'a, I>(commands: I, style: &Stroke<'a>, sink: &mut impl PathBuilder) where I: Iterator + Clone, I::Item: Borrow<Command...
the_stack
use chrono::NaiveDateTime; use wundergraph::query_builder::types::{HasMany, HasOne}; use wundergraph::scalar::WundergraphScalarValue; table! { actors (actor_id) { actor_id -> Int4, first_name -> Varchar, last_name -> Varchar, last_update -> Timestamp, } } table! { albums (a...
the_stack
use std::any::Any; use std::cell::{RefCell, RefMut}; use std::cmp::{self, Ordering}; use std::mem; use std::rc::Rc; use std::time; use sulis_core::config::Config; use sulis_core::extern_image::ImageBuffer; use sulis_core::image::Image; use sulis_core::io::event::ClickKind; use sulis_core::io::*; use sulis_core::resour...
the_stack
use std::cell::RefCell; use std::collections::BTreeMap; use std::rc::Rc; /// Alias for Rc<RefCell<T>> pub type Shared<T> = Rc<RefCell<T>>; /// A routine which could be run. pub trait Runnable { /// Runs a routine with a context instance. fn run(self: Box<Self>); } /// This is a global scheduler suitable to s...
the_stack
use crate::{ app::{Config, FrameBufferPtr, MessageInternal}, drawing::DisplayRotation, geometry::{IntPoint, IntSize, Size}, input, message::Message, render::{ generic::{self, Backend}, Context, ContextInner, }, view::{ strategies::base::{ViewStrategy, ViewStrategy...
the_stack
use std::convert::{TryFrom}; use std::iter::Peekable; use std::ops::RangeInclusive; use std::fmt; use fnv::{FnvHashMap as HashMap, FnvHashSet as HashSet}; use crate::ty::*; use crate::consts::*; use crate::{Manifest, EntryPoint, Specialization}; use crate::parse::{Instrs, Instr}; use crate::error::{Error, Result}; use ...
the_stack
use crate::block_utils; use crate::block_utils::RefBlockChoice; use crate::cli_utils::setup_ctrlc_handler; use crate::data_block_buffer::{BlockArrangement, DataBlockBuffer, InputType, OutputType, Slot}; use crate::file_reader::{FileReader, FileReaderParam}; use crate::file_utils; use crate::file_writer::{FileWriter, Fi...
the_stack
extern crate serde; // needed for json serialization extern crate serde_derive; // needed for json serialization extern crate serde_json; // needed for json serialization extern crate docopt; extern crate whoami; extern crate chrono; use crate::mutate::hex_to_bytes; use std::collections::HashM...
the_stack
use prelude::*; use core::{mem, ops}; use bookkeeper::{self, Allocator, Bookkeeper}; use {brk, sync}; use shim::config; #[cfg(feature = "tls")] use tls; /// Alias for the wrapper type of the thread-local variable holding the local /// allocator. #[cfg(feature = "tls")] type ThreadLocalAllocator = MoveCell<Opti...
the_stack
use std::mem; use std::fmt; use std::io; use std::path::{Path, PathBuf}; use std::ffi::OsStr; use std::collections::{hash_map, HashMap}; use std::cell::RefCell; use std::rc::Rc; use std::sync::Arc; use futures::{future, stream, Future, Stream, BoxFuture}; use futures_cpupool::CpuPool; use url::Url; use parking_lot::{R...
the_stack
//! `seccomp-bpf` support on recent Linux kernels. //! //! This works in tandem with `namespace` in order to implement sandbox profiles. It is generally //! the weaker of the two approaches, because BPF is limited, but it's useful for reducing kernel //! attack surface area and implementing coarse-grained policies. #!...
the_stack
#![cfg_attr(rustfmt, rustfmt_skip)] /// Create a new html template. #[macro_export] macro_rules! html { ($($inner:tt)*) => {{ // Define this up here to prevent rust from saying: // Hey look, it's an FnOnce (this could be Fn/FnMut). let f = |__tmpl: &mut $crate::TemplateBuffer| -> () { ...
the_stack
use crate::quorum::quorum::{AckedIndexer, Index, VoteResult}; use std::cmp::Ordering; use std::collections::hash_set::Iter; use std::collections::{HashMap, HashSet}; use std::fmt::{self, Display, Formatter, Write}; use std::process::id; /// MajorityConfig is a set of IDs that uses majority quorums to make decisions. #...
the_stack
use std::cell::RefCell; use std::io::Error; use std::mem; use std::rc::Rc; use crate::config::Config; use crate::io::{event, Event, GraphicsRenderer}; use crate::resource::ResourceSet; use crate::ui::{theme, Cursor, EmptyWidget, Theme, WidgetKind, WidgetState}; use crate::util::{Point, Rect, Size}; use crate::widgets:...
the_stack
use crate::error::SaphirError; use std::str::FromStr; /// `Range` header, defined in [RFC7233](https://tools.ietf.org/html/rfc7233#section-3.1) /// /// The "Range" header field on a GET request modifies the method /// semantics to request transfer of only one or more subranges of the /// selected representation data, ...
the_stack
use crate::liberty::FunctionTerm; #[allow(unused_extern_crates)] extern crate lalrpop_util as __lalrpop_util; #[allow(unused_imports)] use self::__lalrpop_util::state_machine as __state_machine; #[cfg_attr(rustfmt, rustfmt_skip)] mod __parse__Function { #![allow(non_snake_case, non_camel_case_types, unused_mut, un...
the_stack
extern crate num_traits; use num_traits::Float; use std::iter::Sum; use crate::tree::{BoundingBox, Cut, Node, Tree}; /// The result of a point addition operation. /// /// The `AddedPoint` result contains the key of the point that was added to the /// tree. The `MassIncreased` result contains the key of the point who...
the_stack
use crate::parser::ast::*; use crate::arena::*; use crate::atom_table::*; use crate::fixtures::*; use crate::forms::*; use crate::instructions::*; use crate::machine::loader::*; use crate::machine::machine_state::*; use crate::machine::streams::Stream; use fxhash::FxBuildHasher; use indexmap::IndexMap; use std::cell...
the_stack
struct Foo<T>(T); struct Bar<T> { x: T } struct W(u32); struct A { a: u32 } #[allow(redundant_semicolons)] const fn basics((a,): (u32,)) -> u32 { // Deferred assignment: let b: u32; b = a + 1; // Immediate assignment: let c: u32 = b + 1; // Mutables: let mut d: u32 = c + 1; d = d + 1;...
the_stack
use std::iter::once; use std::ops::Range; use rustc_errors::{pluralize, Applicability, Handler}; use rustc_lexer::unescape::{EscapeError, Mode}; use rustc_span::{BytePos, Span}; pub(crate) fn emit_unescape_error( handler: &Handler, // interior part of the literal, without quotes lit: &str, // full spa...
the_stack
use std::marker::PhantomData; use std::path::{Path, PathBuf}; use anyhow::Context; use generic_array::typenum::{self, Unsigned}; use log::trace; use merkletree::merkle::get_merkle_tree_leafs; use merkletree::store::{DiskStore, Store, StoreConfig}; use serde::{Deserialize, Serialize}; use storage_proofs_core::{ drg...
the_stack
use serde::Serialize; use std::collections::HashMap; use std::path::Path; use std::path::PathBuf; use super::Environment; use super::TestEnvironment; use crate::test_helpers; pub struct TestConfigFileBuilder { environment: TestEnvironment, incremental: Option<bool>, includes: Option<Vec<String>>, excludes: Op...
the_stack
pub struct MapperFactory; use rom::Mirrorings; use rom::RomHeader; use register::Register; impl MapperFactory { pub fn create(header: &RomHeader) -> Box<dyn Mapper> { match header.mapper_num() { 0 => Box::new(NRomMapper::new(header)), 1 => Box::new(MMC1Mapper::new(header)), 2 => Box::new(UNRomMap...
the_stack
use std::io; use std::mem; use std::time::Duration; use crate::definitions::*; use futures::future; use futures::{Async, Future}; use slog::Logger; use tokio_core::reactor::Handle; use tokio_core::reactor::Timeout; use u2f_core::{self, Service}; macro_rules! try_some { ($e:expr) => { match $e { ...
the_stack
use anyhow::{bail, Result}; use cursive::theme::{Effect, Style}; use cursive::utils::markup::StyledString; use log::debug; use std::collections::HashSet; use std::io::prelude::*; use std::io::BufReader; use std::mem::swap; use super::format_markup_tags; use crate::{COLOR_ALERT, COLOR_DFL, STYLE_ALERT}; const RD_PRE_C...
the_stack
use lazy_static::lazy_static; use pyo3::exceptions::PyException; use pyo3::prelude::*; use pyo3::types::PyDict; use std::collections::HashMap; // // Constants // pub const EMPTY_SQUARE_ID: isize = 0; pub const KING_ID: isize = 1; pub const QUEEN_ID: isize = 2; pub const ROOK_ID: isize = 3; pub const BISHOP_ID: isize ...
the_stack
use std::collections::HashMap; use std::str::FromStr; use anyhow::bail; use anyhow::{anyhow, Result}; use itertools::Itertools; use pest::iterators::Pair; use pest::iterators::Pairs; use pest::Parser; use pest_derive::Parser; use super::ast::*; use super::utils::*; use crate::error::{Error, Reason, Span}; #[derive(P...
the_stack
mod frame; mod lua_val; mod object; mod table; pub use lua_val::LuaType; pub use lua_val::RustFunc; use std::cmp::Ordering; use std::collections::HashMap; use std::io; use super::compiler; use super::error::Error; use super::error::ErrorKind; use super::error::TypeError; use super::Chunk; use super::Instr; use super...
the_stack
use crate::enrich::nats::NatsExtractor; use clap::Parser; use config_rs::{Config, ConfigError, File}; use log::*; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; use std::path::Path; use std::sync::Arc; use tornado_common::{ actors::nats_subscriber::NatsSubscriberConfig, command::retry::RetrySt...
the_stack
use std::any::Any; use std::borrow::Borrow; use std::fmt::{Debug, Formatter}; use std::iter::from_fn; use std::marker::PhantomData; use std::ops::{CoerceUnsized, Deref}; use std::rc::Rc; use crate::atn::INVALID_ALT; use crate::char_stream::InputData; use crate::int_stream::EOF; use crate::interval_set::Interval; use ...
the_stack
use super::*; #[rstest::rstest] fn update_all_records(with_schema: TransactionManager) { let txn = with_schema.start_transaction(); assert_statement( &txn, "create table schema_name.table_name (column_test smallint);", vec![OutboundMessage::TableCreated, OutboundMessage::ReadyForQuery]...
the_stack
//! Borrowed forms of [`Rc`] and [`Arc`]. //! //! [`ArcBorrow<_>`](`ArcBorrow`) is functionally equivalent to `&Arc<_>`, //! but it's represented as `&T`, avoiding the extra indirection. //! //! # Examples //! //! ```rust //! # use {rc_borrow::*, std::sync::Arc}; //! # type Resource = u32; //! # fn acquire_resource() -...
the_stack
use std::collections::HashMap; use std::fs::File; use std::io::BufReader; use std::io::Read; use std::path::PathBuf; use fs_extra::dir; use getset::{CopyGetters, Getters, Setters}; use itertools::Itertools; use merge::Merge; use netinfo::{InoutType, NetStatistics}; use sysinfo::{ProcessExt, System, SystemExt}; use c...
the_stack
use crate::wayland::Serial; use super::{ cache::MultiCache, get_children, handlers::is_effectively_sync, transaction::PendingTransaction, SurfaceData, }; use std::sync::{atomic::Ordering, Mutex}; use wayland_server::protocol::wl_surface::WlSurface; pub(crate) static SUBSURFACE_ROLE: &str = "subsurface"; /// ...
the_stack
use crate::api::{ setbac::{Connection, ConnectionMeta, Token}, Setbac, }; use crate::injector::{Injector, Key}; use crate::prelude::*; use crate::utils::Duration; use crate::web; use anyhow::Error; use std::collections::VecDeque; use std::fmt; use std::sync::Arc; use std::time; use thiserror::Error; use tokio::...
the_stack
use std::cell::RefCell; use std::collections::BinaryHeap; use std::io; use std::sync::{ atomic::{AtomicBool, Ordering}, Arc, Mutex, }; use std::time::{Duration, Instant}; use super::ping::{make_ping, PingSource}; use crate::{EventSource, Poll, PostAction, Readiness, Token, TokenFactory}; /// A Timer event sou...
the_stack
#![allow(dead_code)] use crate::imp::reg::{ArgReg, FromAsm, RetReg, SyscallNumber, ToAsm, A0, A1, A2, A3, A4, A5, R0}; use crate::imp::vdso_wrappers::SyscallType; use core::arch::asm; #[inline] pub(in crate::imp) unsafe fn indirect_syscall0( callee: SyscallType, nr: SyscallNumber<'_>, ) -> RetReg<R0> { le...
the_stack
use std::rc::Rc; use std::borrow::Borrow; use std::borrow::Cow; use std::collections::HashMap; use hyper; use serde_json; use futures; use futures::{Future, Stream}; use hyper::header::UserAgent; use super::{Error, configuration}; pub struct PetApiClient<C: hyper::client::Connect> { configuration: Rc<configurat...
the_stack
//! Shaded theme use std::f32; use std::ops::Range; use std::time::Instant; use crate::{dim, ColorsLinear, Config, FlatTheme, InputState, Theme}; use crate::{DrawShaded, DrawShadedImpl}; use kas::cast::traits::*; use kas::dir::{Direction, Directional}; use kas::draw::{color::Rgba, *}; use kas::event::EventState; use ...
the_stack
use super::{ buffer_from_slice, to_u8_slice }; use super::buffers::DynamicBuffer; use super::init::{load_glsl_shader, ShaderStage}; use crate::ui::PrimitiveBuffer; use crate::window::{WindowBuffers, WindowData}; use std::collections::{BTreeMap, HashMap}; use wgpu_glyph::{FontId, ab_glyph::FontVec}; pub struct UiRender...
the_stack
use crate::cx_cocoa::*; use crate::cx::*; impl Cx { pub fn event_loop<F>(&mut self, mut event_handler: F) where F: FnMut(&mut Cx, &mut Event), { self.platform_type = PlatformType::OSX; let mut cocoa_app = CocoaApp::new(); cocoa_app.init(); let...
the_stack
use { anyhow::{Context as _, Error}, fidl_fuchsia_test_manager as ftest_manager, ftest_manager::{CaseStatus, RunOptions, SuiteStatus}, fuchsia_async as fasync, pretty_assertions::assert_eq, regex::Regex, std::collections::HashMap, test_manager_test_lib::{GroupRunEventByTestCase, RunEvent...
the_stack
mod tests; use rowan::{GreenNode, GreenToken, NodeOrToken, WalkEvent}; use syntax::{ast, AstNode, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken}; pub fn format_str(input: &str, options: &FormattingOptions) -> String { let parse = wgsl_parser::parse_file(input); let node = parse.syntax().clone_for_update(...
the_stack
use cgmath::EuclideanSpace; use cgmath::Point3; use iterator::FaceHalfedgeIterator; use iterator::FaceIterator; use mesh::Id; use mesh::Mesh; /// Derives Clone to allow initializing a vec with the vec![value; length] /// macro. #[derive(Clone)] struct FaceData { /// The center point of the original face in the inp...
the_stack
use super::PaletteIndex; use super::SCREEN_BUFFER_SIZE; use super::SCREEN_HEIGHT; use super::SCREEN_WIDTH; use super::TilePattern; use super::ppu_memory::PPUMemory; use super::ppu_reg::PPUReg; use memory::MemSegment; use std::cmp; const TILES_PER_LINE: usize = 34; #[derive(Debug, Copy, Clone, PartialEq)] ...
the_stack
mod connection_message; mod player_details; mod publish_details; mod stream_manager_message; use crate::send; use bytes::Bytes; use futures::future::select_all; use futures::future::BoxFuture; use rml_rtmp::sessions::StreamMetadata; use rml_rtmp::time::RtmpTimestamp; use std::collections::hash_map::HashMap; use tokio:...
the_stack
use std::time::Instant; // External imports // Workspace imports use zksync_types::{ aggregated_operations::{ AggregatedActionType, AggregatedOperation, BlocksCommitOperation, BlocksExecuteOperation, }, AccountId, AccountUpdate, BlockNumber, Token, TokenKind, ZkSyncOp, }; // Local imports use self::...
the_stack
use std::{cell::Cell, fmt, ptr::NonNull, rc::Rc}; pub use wlroots_sys::wlr_key_state; use wlroots_sys::{ wlr_input_device, wlr_keyboard, wlr_keyboard_get_modifiers, wlr_keyboard_led, wlr_keyboard_led_update, wlr_keyboard_modifier, wlr_keyboard_modifiers, wlr_keyboard_set_keymap, xkb_keysym_t }; use xkbcommon::...
the_stack
use super::diags; use crate::{ diag::{self, Check, Pack}, index::Index, Krate, Krates, }; use anyhow::Error; use rustsec::advisory::Metadata; use semver::Version; #[derive(Debug)] pub struct Patch<'a> { /// The advisories the patch is attempting to address pub advisories: Vec<&'a Metadata>, ///...
the_stack
use std::cell::RefCell; use std::collections::HashMap; use std::io::Error; use std::ptr; use std::rc::Rc; use std::usize; use sulis_core::config::Config; use crate::animation::{self, Anim}; use crate::save_state::EntitySaveState; use crate::script::{self, CallbackData, ScriptEntitySet}; use crate::{ entity_attack...
the_stack
use std::error::Error; use std::io::Error as IOError; use std::io::ErrorKind; use std::io::Read; use std::fs::File; use serde::{Serialize,Deserialize};//, Deserialize}; use serde_json::{Value}; use crate::vwmap; use crate::consts; use crate::feature_transform_parser; use crate::vwmap::{NamespaceDescriptor, NamespaceT...
the_stack
use super::*; use std::sync::*; use std::time::Duration; #[test] fn translate_path() { use self::LayerEdit::*; let anim = create_animation(); anim.perform_edits(vec![ AnimationEdit::AddNewLayer(24), AnimationEdit::Layer(24, LayerEdit::AddKeyFrame(Duration::from_millis(300))), Ani...
the_stack
use std::{ pin::Pin, ptr::null_mut, sync::{ atomic::{AtomicBool, AtomicPtr, AtomicUsize, Ordering}, Arc, }, time::Duration, }; use crossbeam::channel::{ self, RecvError, RecvTimeoutError, SendError, TryRecvError, TrySendError, }; use futures::{ stream::Stream, task::{Con...
the_stack
use std::cmp::{Eq, PartialEq}; use std::hash::Hash; use morphorm::Units; use crate::{Color, PropSet2, Selector, State}; use crate::id::GenerationalId; const RULE_INDEX_BITS: u32 = 24; const RULE_INDEX_MASK: u32 = (1<<RULE_INDEX_BITS)-1; const RULE_GENERATION_BITS: u32 = 8; const RULE_GENERATION_MASK: u32 = (1<<RUL...
the_stack
mod linked_list; use self::linked_list::LinkedList; use std::collections::hash_map::DefaultHasher; use std::fmt; use std::hash::{Hash, Hasher}; use std::sync::{ atomic::{AtomicUsize, Ordering}, Arc, }; /// A handle to a shared [`Map`]. /// /// Any operation performed on this handle affects the map seen by all...
the_stack
// Locals use super::{FileTransferActivity, LogLevel}; use crate::filetransfer::{FileTransferError, FileTransferErrorType}; use crate::fs::{FsEntry, FsFile}; use crate::host::HostError; use crate::utils::fmt::fmt_millis; // Ext use bytesize::ByteSize; use std::fs::File; use std::io::{Read, Seek, Write}; use std::path:...
the_stack
use semver::Version; use volta_core::style::tool_version; use super::{Node, Package, PackageManager, Source, Toolchain}; pub(super) fn format(toolchain: &Toolchain) -> Option<String> { let (runtimes, package_managers, packages) = match toolchain { Toolchain::Node(runtimes) => (describe_runtimes(runtimes)...
the_stack
extern crate csv; use self::csv::{ReaderBuilder, WriterBuilder}; use crate::structure::matrix::{matrix, Matrix, Shape::*}; use crate::traits::fp::FPMatrix; use crate::util::useful::tab; use indexmap::{map::Keys, IndexMap}; use json::JsonValue; use std::cmp::{max, min}; use std::collections::HashMap; use std::error::Er...
the_stack
use derive_more::Display; use std::cmp::PartialEq; use std::io::Cursor; use crate::error; use crate::frame::traits::FromCursor; use crate::types::{CInet, CString, CStringList}; // Event types const TOPOLOGY_CHANGE: &str = "TOPOLOGY_CHANGE"; const STATUS_CHANGE: &str = "STATUS_CHANGE"; const SCHEMA_CHANGE: &str = "SCH...
the_stack
use base_db::{FileRange, TextRange, TextSize}; use ide::inlay_hints::{InlayHint, InlayKind}; use ide_completion::item::{CompletionItem, CompletionItemKind, CompletionRelevance}; use itertools::Itertools; use paths::AbsPath; use std::path; use text_edit::{Indel, TextEdit}; use vfs::FileId; use crate::{ global_state...
the_stack
use std::collections::{HashMap, HashSet, VecDeque}; use crate::error::ParseError; use crate::lexer::{Item, ItemType, Lexer}; use crate::node::*; use crate::utils::*; pub struct Parser { name: String, pub funcs: HashSet<String>, lex: Option<Lexer>, line: usize, token: VecDeque<Item>, peek_count...
the_stack
//! Generic algebraic structures use num_traits::{cast, Float}; use std::cmp; use std::iter; use std::ops::*; use approx; use angle::Rad; use num::{BaseFloat, BaseNum}; pub use num_traits::{Bounded, Num, NumCast, One, Zero}; /// An array containing elements of type `Element` pub trait Array where // FIXME: Ugl...
the_stack
#![allow(non_camel_case_types)] use alloc::string::String; use alloc::vec::Vec; use alloc::{collections::VecDeque, format}; use core::intrinsics::unlikely; use core::{convert::TryInto, ptr}; use driverkit::{ devq::{DevQueue, DevQueueError}, iomem::IOBufChain, net::csum::*, net::rss::*, }; use x86::cu...
the_stack
use crate::connectors::google::AuthInterceptor; use crate::connectors::prelude::*; use crate::connectors::utils::url::HttpsDefaults; use async_std::channel::{Receiver, Sender}; use async_std::stream::StreamExt; use async_std::sync::RwLock; use async_std::task; use async_std::task::JoinHandle; use beef::generic::Cow; us...
the_stack
#![deny(broken_intra_doc_links)] #![deny(missing_docs)] #![deny(unsafe_code)] #[cfg(any(feature = "rest-client", feature = "rpc-client"))] pub mod http; pub mod init; pub mod poll; #[cfg(feature = "rest-client")] pub mod rest; #[cfg(feature = "rpc-client")] pub mod rpc; #[cfg(any(feature = "rest-client", feature =...
the_stack
extern crate proc_macro; extern crate syn; #[macro_use] extern crate quote; use syn::{Data, Fields, Ident, Type}; use proc_macro::TokenStream; struct Analysis { filters: Vec<String>, num_fields: Vec<Ident>, str_fields: Vec<(Ident, bool)>, runner: Option<Ident>, } impl Analysis { fn from(ast: &sy...
the_stack
use std::cmp::{max, min}; use std::ops::{Bound, Deref, Index, IndexMut, Range, RangeBounds}; use serde::{Deserialize, Serialize}; use crate::ansi::{CharsetIndex, StandardCharset}; use crate::index::{Column, Line, Point}; use crate::term::cell::{Flags, ResetDiscriminant}; pub mod resize; mod row; mod storage; #[cfg(t...
the_stack
use frame_support::assert_ok; use frame_support::codec::Encode; use orml_traits::MultiCurrency; use xcm::latest::{Junction, Junction::*, Junctions::*, MultiLocation, NetworkId}; use xcm_emulator::TestExt; use core_traits::{Balance, FungibleTokenId}; use pioneer_runtime::{Balances, KUsdPerSecond, KarPerSecond, KsmPerSe...
the_stack
use core::alloc::{GlobalAlloc, Layout}; use core::ptr::null_mut; use core::mem; use core::fmt; use core::result::Result; use core::sync::atomic::{AtomicUsize, Ordering}; use platform::physmem::{PhysMemSize, PhysMemBase}; use super::physmem::{self, alloc_region, RegionHygiene}; use super::error::Cause; /* different sta...
the_stack
use crate::config::EthereumConfig; use crate::ethereum::Chain; use crate::retry::Retry; use std::future::Future; use std::num::NonZeroU64; use std::time::Duration; use anyhow::Context; use futures::TryFutureExt; use tracing::{debug, error, info}; use web3::{ transports::Http, types::{Block, BlockId, Filter, L...
the_stack
use core_traits::{ ValueType, }; use edn::query::{ Binding, FnArg, SrcVar, VariableOrPlaceholder, WhereFn, }; use clauses::{ ConjoiningClauses, }; use query_algebrizer_traits::errors::{ AlgebrizerError, BindingError, Result, }; use types::{ Column, ColumnConstraint, ...
the_stack
use serde_json; use serde_derive::Deserialize; use crate::utils::hex_to_uint256; use crate::{BlockHeaderData, BlockSource, BlockSourceRespErr}; use bitcoin::hashes::hex::{ToHex, FromHex}; use bitcoin::hash_types::{BlockHash, TxMerkleNode}; use bitcoin::blockdata::block::{Block, BlockHeader}; use bitcoin::consensus:...
the_stack
use anyhow::Result; use serde::Deserialize; use tui::style; #[derive(Clone, Debug, Deserialize)] /// Application theme configurations. pub struct ThemeConfig { #[serde(default)] pub themes: Vec<Theme>, } #[derive(Clone, Debug, Deserialize)] pub struct Theme { pub name: String, palette: Palette, #[...
the_stack
use byteorder::{LE, ReadBytesExt}; use std::hash::Hasher; use std::io::{self, Read, BufRead, ErrorKind}; use std::cmp; use std::convert::TryInto; use twox_hash::XxHash32; use thiserror::Error; use fehler::{throw, throws}; use super::{MAGIC, INCOMPRESSIBLE, WINDOW_SIZE}; use super::header::{self, Flags, BlockDescriptor...
the_stack
use bitvec::prelude::*; use log::trace; use serde::{Deserialize, Serialize}; use std::cmp::min; use crate::{ consts::{AUDIO_SAMPLE_PER_FRAME, DOTS_PER_LINE, LINES_PER_FRAME}, interface::{AudioBuffer, AudioSample}, util::{pack, ClockDivider}, }; #[derive(Default, Serialize, Deserialize)] pub struct Apu { ...
the_stack
extern crate native_windows_gui as nwg; use nwg::NativeUi; #[derive(Debug)] enum Token { Number(i32), Plus, Minus, Mult, Div } #[derive(Default)] pub struct Calculator { window: nwg::Window, layout: nwg::GridLayout, input: nwg::TextInput, btn0: nwg::Button, btn1: nwg::Butt...
the_stack
use std::mem; use std::sync::Arc; use std::collections::VecDeque; use std::time::Instant; use futures::{Future, Poll, Async}; use tk_bufstream::{IoBuf, WriteBuf, ReadBuf}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_core::reactor::{Handle, Timeout}; use super::encoder::{self, get_inner, ResponseConfig}; use supe...
the_stack
use moon::*; use shared::*; // mod client; // mod invoice; // mod project; // mod time_block; // mod time_entry; // mod user; // use client::{self, ClientArgs}; // use invoice::{self, InvoiceArgs}; // use project::{self, ProjectArgs}; // use time_block::{self, TimeBlockArgs}; // use time_entry::{self, TimeEntryArgs};...
the_stack
use std::io; use std::net::SocketAddr; use std::str::{self, FromStr}; use futures::{Future, Stream}; use tokio_core::reactor::Handle; use tokio_core::net::{TcpListener, TcpStream}; use hyper::{self, Headers, Body, Client, HttpVersion}; use hyper::client::{self, HttpConnector, Service}; use hyper::header; use hyper::se...
the_stack
use cookie_factory::*; use flate2::read::GzDecoder; use flate2::write::GzEncoder; use flate2::Compression; use nom::*; use nom::{ bits::streaming::take as take_bits, bytes::streaming::take, combinator::{cond, map, map_opt, peek, verify}, error::{Error as NomError, ErrorKind}, multi::{count, length_c...
the_stack
use std::fmt; use std::io::Error; use std::rc::Rc; use sulis_core::io::{DrawList, GraphicsRenderer}; use sulis_core::ui::{animation_state, AnimationState, Color}; use sulis_core::util::{self, invalid_data_error, Offset, Scale, Size}; use sulis_module::area::PropData; use sulis_module::{prop, ItemState, LootList, Modul...
the_stack
use makepad_render::*; use makepad_widget::*; use makepad_microserde::*; use makepad_worlds::set_worlds_style; use crate::makepadwindow::*; use crate::makepadstorage::*; use crate::filetree::*; use crate::buildmanager::*; use crate::makepadstyle::*; pub struct MakepadApp { pub makepad_window_state_template: Makepa...
the_stack
use crate::structure::matrix::*; #[allow(unused_imports)] use crate::structure::polynomial::*; #[allow(unused_imports)] use crate::structure::vector::*; use crate::traits::num::PowOps; #[allow(unused_imports)] use crate::util::non_macro::*; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; use std::cmp::{m...
the_stack
use futures::Stream; use std::pin::Pin; use thiserror::Error; use tonic::{Response, Status, Streaming}; #[derive(Debug, Error)] pub enum Error { #[error("Cannot route request: {0}")] RoutingError(#[from] Box<dyn std::error::Error + Sync + Send>), } impl From<Error> for Status { fn from(error: Error) -> Se...
the_stack
use bincode; use bytes::Bytes; use command::CommandError; use linear_map::{Entry as LMEntry, LinearMap}; use resp::RespValue; use std::boxed::FnBox; use std::time; use version_vector::*; pub type MutatorFn = Box<FnBox(Id, Version, Cube) -> Result<(Cube, Option<RespValue>), CommandError> + Send>; pub type ResponseF...
the_stack
use super::{CompressedVariableWidthSliceVector, FixedWidthSliceVector, VariableWidthSliceVector}; use crate::io::write_as_bytes; use std::convert::TryFrom; use std::io::{Read, Result, Seek, SeekFrom, Write}; use stream_vbyte::{decode, encode, Scalar}; #[derive(Clone)] pub struct MultiSetVector<'a> { data: Compress...
the_stack
extern crate log; use std::sync::Arc; use std::sync::Mutex; use std::time::Duration; use anyhow::Result; use async_trait::async_trait; use futures::StreamExt; use tokio_stream::wrappers::ReceiverStream; use rsocket_rust::prelude::{Flux, Payload, RSocket}; #[cfg(test)] mod tests { use std::time::Duration; u...
the_stack
use crate::path::*; use flo_canvas::*; use std::sync::*; use std::time::Duration; use std::slice; // TODO: add a way to add a 2D transformation for the content of a region #[derive(Clone, Copy, PartialEq, Debug)] enum FillStyle { Solid(Color), Texture(TextureId, (f32, f32), (f32, f32)), Gradient(Gradien...
the_stack
use super::weather::Weather; use super::DayTime; use super::Renderer; use super::{Config, GameContext, WorldManager}; use base::gen::WorldGenerator; use base::math::*; use base::world; use base::world::ChunkProvider; use base::world::HexPillar; use base::world::PillarIndex; use base::world::PillarSection; use base::wor...
the_stack
// std use std::f32::consts::PI; // pbrt use crate::core::geometry::{spherical_direction, vec3_abs_dot_vec3f}; use crate::core::geometry::{Point2f, Vector3f, XYEnum}; use crate::core::pbrt::Float; use crate::core::pbrt::{erf, erf_inv}; use crate::core::reflection::{ abs_cos_theta, cos_2_phi, cos_2_theta, cos_phi, c...
the_stack
use common_base::base::tokio; use common_exception::Result; use databend_query::optimizers::*; use databend_query::sql::PlanParser; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_expression_transform_optimizer() -> Result<()> { struct Test { name: &'static str, query: &'s...
the_stack
use std::{ fmt::Debug, ops::{Deref, DerefMut}, pin::Pin, }; use libc::c_void; use nix::errno::Errno; use spdk_rs::{ libspdk::{spdk_bdev_io, spdk_io_channel}, BdevIo, }; use super::{ nexus_lookup_mut, Nexus, NexusChannel, NexusChannelInner, NexusStatus, NEXUS_PRODUCT_ID, };...
the_stack
pub struct DescribeAutoScalingGroupsPaginator< C = aws_smithy_client::erase::DynConnector, M = crate::middleware::DefaultMiddleware, R = aws_smithy_client::retry::Standard, > { handle: std::sync::Arc<crate::client::Handle<C, M, R>>, builder: crate::input::describe_auto_scaling_groups_input::Builder,...
the_stack
use std::{ collections::HashMap, convert::TryFrom, marker::PhantomData, str::FromStr, }; use codec::{ Decode, Encode, Error as CodecError, }; use frame_metadata::{ DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, Sto...
the_stack