text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use std::{
array::TryFromSliceError,
collections::HashMap,
fmt::{Debug, Display},
ops::RangeBounds,
};
use byteorder::{BigEndian, ByteOrder, ReadBytesExt, WriteBytesExt};
use super::{
btree::BTreeEntry,
by_id::{ByIdStats, VersionedByIdIndex},
by_sequence::{BySequenceIndex, BySequenceStats}... | the_stack |
use crate::camera::Ray;
use crate::data::assets::Assets;
use crate::data::vector::Vector;
use crate::onb::Onb;
use crate::pdf::uniform;
use crate::world::geometry::axis_aligned_bounding_box::AxisAlignedBoundingBox;
use crate::world::geometry::{Geometry, HitResult, Hittable};
use crate::world::materials::Material;
use s... | the_stack |
/// Trait specifying that a structure can be safely cast to other ByteSafe
/// structures. This indicates there are no possible invalid encodings with
/// any underlying binary data.
///
/// Trait is unsafe as `Self` must *only* composed of types with no
/// unsafe/invalid binary representations, and has no padding of ... | the_stack |
//! Resource management and resolution for the virtio-video device.
use std::convert::TryInto;
use std::fmt;
use base::{
self, FromRawDescriptor, IntoRawDescriptor, MemoryMappingArena, MemoryMappingBuilder,
MemoryMappingBuilderUnix, MmapError, SafeDescriptor,
};
use vm_memory::{GuestAddress, GuestMemory, Gues... | the_stack |
use crate::{
network_interface::ConsensusMsg,
network_tests::{NetworkPlayground, TwinId},
test_utils::{consensus_runtime, timed_block_on},
twins::twins_node::SMRNode,
};
use aptos_config::config::ConsensusProposerType::{FixedProposer, RotatingProposer, RoundProposer};
use consensus_types::{block::Block,... | the_stack |
pub const ECB: usize = 0;
pub const CBC: usize = 1;
pub const CFB1: usize = 2;
pub const CFB2: usize = 3;
pub const CFB4: usize = 5;
pub const OFB1: usize = 14;
pub const OFB2: usize = 15;
pub const OFB4: usize = 17;
pub const OFB8: usize = 21;
pub const OFB16: usize = 29;
pub const CTR1: usize = 30;
pub const CTR2: us... | the_stack |
#![allow(warnings)]
use std::{collections::HashMap};
use dasp_graph::{NodeData, BoxedNodeSend};
use petgraph::graph::{NodeIndex};
use petgraph::stable_graph::{StableDiGraph};
use pest::Parser;
use pest::iterators::Pairs;
use glicol_synth::Para;
use glicol_synth::make_node;
use glicol_synth::signal::dummy::{Clock, Audi... | the_stack |
use std::collections::HashMap;
use std::path::{Path, PathBuf};
use dhall::{Ctxt, Parsed};
use crate::options::{HasAnnot, ManualAnnot, NoAnnot, StaticAnnot, TypeAnnot};
use crate::SimpleType;
use crate::{Error, ErrorKind, FromDhall, Result, Value};
#[derive(Debug, Clone)]
enum Source<'a> {
Str(&'a str),
File(... | the_stack |
use crate::mem_utils::memcpy_bytes;
use crate::memory::{alloc_blob, Memory};
use crate::rts_trap_with;
use crate::text::{blob_compare, blob_of_text};
use crate::types::{Bytes, Value, TAG_BLOB};
use motoko_rts_macros::ic_mem_fn;
// CRC32 for blobs. Loosely based on https://rosettacode.org/wiki/CRC-32#Implementation_2
... | the_stack |
use actix_web::{HttpResponse, HttpServer, HttpRequest, Responder, HttpMessage, get, web, App};
use urlqstring::QueryParams;
use percent_encoding::percent_decode_str;
use std::borrow::Cow;
use crate::crypto::{Crypto, HashType};
use crate::request::generate_response;
use std::collections::HashMap;
fn get_cookie_string... | the_stack |
make_attrs! {
// Missing data-*
Accept => "accept", AcceptCharset => "accept-charset", AccessKey => "accesskey", Action => "action",
Alt => "alt", Async => "async", AutoComplete => "autocomplete", AutoFocus => "autofocus",
AutoPlay => "autoplay", Charset => "charset", Checked => "checked", Cite => "cite... | the_stack |
use crate::*;
use futures::sink::SinkExt;
use futures::stream::StreamExt;
use ghost_actor::dependencies::tracing;
use kitsune_p2p_types::config::KitsuneP2pTuningParams;
use kitsune_p2p_types::dependencies::serde_json;
use std::collections::HashMap;
/// Wrap a transport listener sender/receiver in kitsune proxy logic.
... | the_stack |
use super::*;
use crate::domain::*;
use crate::infra::*;
use opendatafabric::serde::yaml::formats::datetime_rfc3339;
use opendatafabric::*;
use ::serde::{Deserialize, Serialize};
use ::serde_with::skip_serializing_none;
use chrono::{DateTime, Utc};
use std::cell::RefCell;
use std::sync::Arc;
use tracing::error;
use tr... | the_stack |
use syntax::{
ast::{
self,
edit::{AstNodeEdit, IndentLevel},
},
AstNode, SyntaxKind, TextRange, T,
};
use crate::{AssistContext, AssistId, AssistKind, Assists};
// Assist: unwrap_block
//
// This assist removes if...else, for, while and loop control statements to just keep the body.
//
// ... | the_stack |
use crate::car::*;
use crate::physics::{IntoPhysx, PhysicsState, PxMaterial, RigidDynamicHandle};
use dolly::prelude::*;
use kajiya::world_renderer::{AddMeshOptions, InstanceHandle, WorldRenderer};
use kajiya_simple::*;
use physx::prelude::*;
pub struct Game {
physics: &'static mut PhysicsState,
physics_materi... | the_stack |
use super::errors::{DelgCredCDDErrorKind, DelgCredCDDResult};
use super::groth_sig::{
Groth1SetupParams, Groth1Sig, Groth1Verkey, Groth2SetupParams, Groth2Sig, Groth2Verkey,
GrothS1, GrothS2, GrothSigkey,
};
use amcl_wrapper::extension_field_gt::GT;
use amcl_wrapper::field_elem::{FieldElement, FieldElementVecto... | the_stack |
use crate::prelude::*;
use crate::presenter;
use crate::executor::global::spawn_stream_handler;
use crate::presenter::graph::ViewNodeId;
use enso_frp as frp;
use ide_view as view;
// =============
// === Model ===
// =============
// Those fields will be probably used when Searcher and Breadcrumbs integration will... | the_stack |
use crate::key::exchange::compute_mic_from_buf;
use crate::key::exchange::{
handshake::group_key::{self, Config, GroupKeyHandshakeFrame},
Key,
};
use crate::key::{gtk::Gtk, igtk::Igtk};
use crate::key_data;
use crate::key_data::kde::GtkInfoTx;
use crate::rsna::{
Dot11VerifiedKeyFrame, IgtkSupport, Protectio... | the_stack |
pub mod file;
pub mod loader;
pub mod mem;
pub mod meta;
#[deprecated(
since = "0.5.0",
note = "This is a stub, use the `dicom-pixeldata` crate instead"
)]
pub mod pixeldata;
pub mod tokens;
mod util;
pub use crate::file::{from_reader, open_file};
pub use crate::mem::InMemDicomObject;
pub use crate::meta::{Fi... | the_stack |
use smallvec::smallvec;
use smartstring::SmartString;
use rle::{HasLength, MergableSpan, Searchable};
use rle::zip::rle_zip;
use crate::{AgentId, ROOT_AGENT, ROOT_TIME};
use crate::list::{Branch, ClientData, OpLog, switch, Time};
use crate::list::frontier::advance_frontier_by_known_run;
use crate::list::history::{Histo... | the_stack |
mod fixtures;
use std::collections::HashMap;
use fixtures::{models::*, Fixture, User};
use futures::stream::StreamExt;
use wither::bson::doc;
use wither::mongodb::options::{FindOneAndReplaceOptions, FindOneAndUpdateOptions, ReturnDocument};
use wither::{prelude::*, IndexModel};
//////////////////////////////////////... | the_stack |
/// Represents a key on a keyboard
#[derive(Debug)]
pub struct KeyDefinition {
pub key: &'static str,
pub key_code: i64,
pub code: &'static str,
pub text: Option<&'static str>,
}
// Generated the following in node using Puppeteer:
// keys = require("./lib/USKeyboardLayout.js")
// toStruct = (kD) => ... | the_stack |
use std::{
collections::HashSet,
convert::TryInto,
fmt,
fmt::{Display, Formatter, Write},
iter, mem, ptr, slice,
};
use either::Either;
use crate::eval::bc::{
addr::{BcAddr, BcAddrOffset, BcPtrAddr},
instr::BcInstr,
instr_impl::{InstrEnd, InstrForLoop},
opcode::{BcOpcode, BcOpcodeH... | the_stack |
use std::collections::HashMap;
use std::fs;
use std::io::{BufRead, BufReader, BufWriter, Read, Write};
use std::os::unix::io::AsRawFd;
use std::os::unix::net::{UnixListener, UnixStream};
use std::path::PathBuf;
use std::process::{Command, Stdio};
use std::thread;
use std::time::Duration;
use anyhow::{anyhow, Context, ... | the_stack |
use ron::ser::PrettyConfig;
use serde::{Deserialize, Serialize};
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::fmt;
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
// Deserialization of 'devices.json'
#[derive(Deserialize)]
pub struct DevicesDatabase {
pub families: BTreeMap<String... | the_stack |
mod binary;
use crate::Zero;
// TODO: Similar OpInline tratis for BitAnd, BitOr, BitXor, ...
pub trait AddInline<Rhs>: Sized {
/// **Note.** Implementers *must* add the `#[inline(always)]` attribute
fn add_inline(&self, rhs: Rhs) -> Self;
/// **Note.** Implementers *must* add the `#[inline(always)]` attr... | the_stack |
use crate::codegen::{build_context_function, globals, util, BuilderContext, TargetProperties};
use inkwell::context::Context;
use inkwell::module::{Linkage, Module};
use inkwell::types::{BasicType, VectorType};
use inkwell::values::InstructionOpcode;
use inkwell::values::{FunctionValue, VectorValue};
use inkwell::Float... | the_stack |
use crate::{
query_executor::QueryExecutor,
transaction_manager::{TransactionContext, TransactionManager},
QueryPlanCache,
};
use data_repr::scalar::ScalarValue;
use postgre_sql::{
query_ast::{Request, Statement, Transaction},
query_parser::QueryParser,
query_response::{QueryError, QueryEvent},
... | the_stack |
use mio::net::{TcpListener, TcpSocket, TcpStream};
use serde::{Deserialize, Serialize};
use slab::Slab;
use std::io::{self, Read, Write};
use std::net::{IpAddr, SocketAddr};
use std::sync::Arc;
use std::time::Duration;
use crate::event::{Event, P2pPeerEvent, P2pPeerUnknownEvent, P2pServerEvent, WakeupEvent};
use crate... | the_stack |
use fidl_fuchsia_input_report::{
Axis, ContactInputDescriptor, ContactInputReport, DeviceDescriptor, DeviceInfo, FeatureReport,
InputReport, SensorAxis, SensorDescriptor, SensorFeatureDescriptor, SensorFeatureReport,
SensorInputDescriptor, SensorInputReport, SensorReportingState, TouchDescriptor,
TouchI... | the_stack |
#[macro_use]
extern crate clap;
extern crate rustbox;
extern crate serde_json;
extern crate subsequence_match;
extern crate swiboe;
extern crate swiboe_gui as gui;
extern crate time;
extern crate uuid;
use gui::buffer_views;
use gui::keymap_handler;
use rustbox::{Color, RustBox};
use std::cmp;
use std::env;
use std::n... | the_stack |
use crate::{
aead,
aes::Encrypt,
aesgcm::{
payload::{DecryptionPayload, Payload},
NONCE_LEN, TAG_LEN,
},
block::{Batch, BatchMut, Block, Zeroed, LEN as BLOCK_LEN},
ctr::Ctr,
ghash::GHash,
};
use core::{
marker::PhantomData,
sync::atomic::{compiler_fence, Ordering},
};... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ExceptionResourceType {
#[allow(missing_docs)] // documentation mi... | the_stack |
//! Objects whose struct type has key ability represent Sui objects.
//! They have unique IDs that should never be reused. This verifier makes
//! sure that the id field of Sui objects never get leaked.
//! Unpack is the only bytecode that could extract the id field out of
//! a Sui object. From there, we track the flo... | the_stack |
use std::any::TypeId;
// Calculate the sum of an expression consisting of just plus and minus, like `value = a + b - c + d`.
// The expression is rewritten to `value = a + (b - (c - d))` (note the flipped sign on d).
// After this the `$add` and `$sub` functions are used to make the calculation.
// For f32 using `_mm_... | the_stack |
use core::num::{NonZeroU16, NonZeroU8};
use crate::format_description::modifier;
#[cfg(feature = "large-dates")]
use crate::parsing::combinator::n_to_m_digits_padded;
use crate::parsing::combinator::{
any_digit, exactly_n_digits, exactly_n_digits_padded, first_match, opt, sign,
};
use crate::parsing::ParsedItem;
u... | the_stack |
mod table;
use crate::compression::{mod_p, ByteVec, Bytes};
use crate::error::usize_to_i32;
use crate::io::Data;
use crate::meta::attribute::ChannelList;
use crate::prelude::*;
use std::cmp::min;
use std::mem::size_of;
use table::{EXP_TABLE, LOG_TABLE};
const BLOCK_SAMPLE_COUNT: usize = 4;
// As B44 compression is o... | the_stack |
use rustboyadvance_core::prelude::*;
use rustboyadvance_core::util::audio::{AudioRingBuffer, Producer};
// use rustboyadvance_core::util::FpsCounter;
use std::cell::RefCell;
use std::path::Path;
use std::rc::Rc;
use std::sync::{Mutex, MutexGuard};
use std::time::{Duration, Instant};
use jni::objects::{GlobalRef, JMet... | the_stack |
use core::alloc::Layout;
use core::cmp::Ordering;
use core::convert::TryFrom;
use core::ffi::c_void;
use core::fmt::{self, Debug, Display, Write};
use core::hash::{Hash, Hasher};
use core::mem::{self, size_of};
use core::ptr::{self, NonNull};
use core::slice;
use liblumen_core::sys::dynamic_call::DynamicCallee;
use c... | the_stack |
use std::{
borrow::{Borrow, BorrowMut},
fmt::Debug,
marker::PhantomData,
};
use async_trait::async_trait;
use futures::TryStreamExt;
use crate::{event, event::Event, message, version::Version};
/// An Aggregate represents a Domain Model that, through an Aggregate [Root],
/// acts as a _transactional boun... | the_stack |
//! Self-updates for nextest.
use crate::errors::{UpdateError, UpdateVersionParseError};
use camino::{Utf8Path, Utf8PathBuf};
use mukti_metadata::{MuktiProject, MuktiReleasesJson, ReleaseLocation, ReleaseVersionData};
use self_update::{ArchiveKind, Compression, Download, Extract};
use semver::{Version, VersionReq};
us... | the_stack |
mod palette_map;
mod palettes;
use std::borrow::Cow;
use std::fmt;
use std::str::FromStr;
use rgb::RGB8;
pub use self::palette_map::PaletteMap;
/// A re-export of `RGB8` from the [`rgb` crate](https://docs.rs/rgb).
pub type Color = RGB8;
pub(super) const VDGREY: Color = Color {
r: 160,
g: 160,
b: 160,
... | the_stack |
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
use crate::db::format::{InternalKey, InternalKeyComparator};
use crate::error::Result;
use crate::itera... | the_stack |
pub(crate) mod dphyp;
pub(crate) mod dpsize;
pub(crate) mod greedy;
use crate::error::{Error, Result};
use crate::join::graph::{Edge, Graph, VertexSet};
use crate::join::{JoinKind, JoinOp};
use crate::lgc::LgcPlan;
use crate::op::{Op, OpMutVisitor};
use crate::query::QuerySet;
use std::borrow::Cow;
use std::collection... | the_stack |
use ansi_term::{Color, Style};
use atomicwrites::{AtomicFile, OverwriteBehavior};
use camino::{Utf8Path, Utf8PathBuf};
use guppy::graph::{DependencyDirection, PackageGraph, PackageMetadata, PackageSet};
use std::{
borrow::Cow, cmp::Ordering, collections::BTreeMap, convert::TryFrom, error, fmt, fs, io,
io::Write... | the_stack |
use crate::common::*;
use crate::slider::SliderEvent;
use femtovg::{renderer::OpenGl, Canvas, LineCap, Paint, Path, Solidity};
use std::sync::{Arc, Mutex};
pub struct ControlKnob {
sliding: bool, // Could replace this with a bool in state, maybe in mouse
pub value: f32,
temp: f32,
mouse_down_posy: ... | the_stack |
use std::time::Duration;
use assert_matches::assert_matches;
use bytes::{Bytes, BytesMut};
use futures::{future, StreamExt};
use http::Request;
use h3::{
client,
error::{Code, Kind},
server,
test_helpers::{
proto::{coding::Encode as _, frame::Frame, stream::StreamType},
ConnectionState... | the_stack |
use std::{convert::TryFrom, fmt::Debug};
use num::Zero;
use regalloc2::{MachineEnv, PReg, VReg, Operand};
use crate::types::{IdxVec, Size,
vcode::{BlockId, GlobalId, SpillId, ProcId, InstId, Inst as VInst, VCode}};
const fn preg(i: usize) -> PReg { PReg::new(i, regalloc2::RegClass::Int) }
/// If true, then a REX ... | the_stack |
use super::bsr::*;
use super::sbac::EvcdSbac;
use super::{EvcdCore, EvcdCtx};
use crate::api::{EvcError, NaluType, SliceType};
use crate::def::*;
use crate::ipred::*;
use crate::itdq::*;
use crate::mc::*;
use crate::picman::*;
use crate::recon::*;
use crate::tbl::*;
use crate::tracer::*;
use crate::util::*;
use std::c... | the_stack |
extern crate log;
use std::env;
use std::fs::{self, File};
use std::io::{self, BufReader, Write};
use std::os::unix::io::{AsRawFd, FromRawFd};
use std::os::unix::process::ExitStatusExt;
use std::sync::Arc;
use std::time::Duration;
use std::{collections::HashMap, convert::TryFrom};
use anyhow::Error;
use futures::{Str... | the_stack |
use senseicore::hex_utils;
use std::{
fs::File,
io::{self, Read},
};
use clap::{Arg, Command};
use sensei::GetBalanceRequest;
use sensei::{admin_client::AdminClient, node_client::NodeClient};
use tonic::{metadata::MetadataValue, transport::Channel, Request};
use crate::sensei::{
CloseChannelRequest, Conne... | the_stack |
use litcrypt::lc;
use std::error::Error;
use std::env::{var, args};
use is_root::is_root;
use crate::cmd::{CommandArgs, shell, save, notion_out};
#[cfg(not(windows))] use std::fs::{create_dir, copy, write};
#[cfg(windows)] use std::path::Path;
#[cfg(windows)] use winreg::{RegKey};
#[cfg(windows)] use std::fs::copy as f... | the_stack |
use std::{
ffi::{CStr, CString},
fmt::Display,
mem::MaybeUninit,
ptr::null_mut,
str::FromStr,
};
#[allow(warnings, clippy::warnings)]
pub mod sys;
/// Get the major and minor NVVM IR version.
pub fn ir_version() -> (i32, i32) {
unsafe {
let mut major_ir = MaybeUninit::uninit();
... | the_stack |
use crate::error::Error;
use crate::parser::{ExpressionI, ValueI,
Expression, Value};
use crate::compiler::{Instruction::{self, IConst}, InstructionI};
use std::fmt;
use std::mem;
#[cfg(feature="unsafe-vars")]
use std::collections::BTreeMap;
// Eliminate function call overhead:
macro_rules! get... | the_stack |
use std::borrow::Cow;
use std::cell::RefCell;
use std::collections::{HashMap, HashSet};
use std::fmt;
use std::fmt::Debug;
use std::ops::Deref;
use std::rc::Rc;
use num::FromPrimitive;
use immutable_map::TreeMap;
use error::{CompileError, CompileErrorKind};
use datum::{cons, Datum, TryConv, SimpleDatum};
use primitiv... | the_stack |
use {
fidl_fuchsia_input as input, fidl_fuchsia_ui_focus as ui_focus,
fidl_fuchsia_ui_shortcut as ui_shortcut, fidl_fuchsia_ui_views as ui_views,
fuchsia_scenic as scenic,
fuchsia_syslog::{fx_log_debug, fx_log_info},
fuchsia_zircon as zx,
fuchsia_zircon::AsHandleRef,
futures::{
lock:... | the_stack |
use gazebo::prelude::*;
use crate::{components::Blank, content::LinesExt, Component, Dimensions, DrawMode, Line, State};
/// Select the alignment of the vertical content
#[derive(Debug, Eq, PartialEq, Clone, Dupe, Copy)]
pub enum VerticalAlignmentKind {
/// Content appears at the top.
Top,
/// Content app... | the_stack |
extern crate rz80;
extern crate time;
extern crate minifb;
use rz80::{CPU, PIO, Bus, RegT, PIO_A, PIO_B};
use minifb::{Key, Window, Scale, WindowOptions};
use time::PreciseTime;
use std::cell::RefCell;
// import binary dumps of the operating system, font data and BASIC interpreter
static OS: &'static [u8] = incl... | the_stack |
use async_trait::async_trait;
use common_ast::udfs::UDFDefinition;
use common_ast::udfs::UDFExprTraverser;
use common_ast::udfs::UDFExprVisitor;
use common_ast::udfs::UDFFetcher;
use common_ast::udfs::UDFParser;
use common_ast::udfs::UDFTransformer;
use common_datavalues::prelude::*;
use common_exception::ErrorCode;
us... | the_stack |
use super::{Map, Rect, TileType, Position, spawner, SHOW_MAPGEN_VISUALIZER};
use specs::prelude::*;
mod simple_map;
mod bsp_dungeon;
mod bsp_interior;
mod cellular_automata;
mod drunkard;
mod maze;
mod dla;
mod common;
mod voronoi;
mod waveform_collapse;
mod prefab_builder;
mod room_based_spawner;
mod room_based_starti... | the_stack |
use crate::network::disconnect_with_message;
use crate::NetworkState;
use ckb_logger::{debug, error, trace, warn};
use ckb_types::{packed, prelude::*};
use futures::{
channel::mpsc::{channel, Receiver, Sender},
prelude::*,
};
use p2p::{
bytes::Bytes,
context::{ProtocolContext, ProtocolContextMutRef},
... | the_stack |
use num_bigint::BigUint;
use rand::{rngs::OsRng, Rng};
use std::iter::repeat;
use crate::constants::{ELGAMAL_G, ELGAMAL_P};
use crate::crypto::math::rectify;
use crate::crypto::SessionKey;
pub struct DHSessionKeyBuilder {
dh_priv: BigUint,
dh_pub: BigUint,
}
impl DHSessionKeyBuilder {
pub fn new() -> Sel... | the_stack |
use rand::prelude::*;
use std::f32;
use std::any::Any;
use crate::Modulator;
use crate::ModulatorEnv;
///
/// Simple modulator using a value closure/`Fn`, with frequency and amplitude. The
/// closure receives self, elapsed time (in seconds) and returns a new value.
//
pub struct Wave {
pub amplitude: f32,
p... | the_stack |
use {
anyhow::{Context as _, Error},
component_events::events::EventSource,
fidl_fuchsia_io::DirectoryProxy,
fidl_fuchsia_sys::{
ComponentControllerEvent, EnvironmentControllerEvent, EnvironmentControllerProxy,
EnvironmentMarker, EnvironmentOptions, LauncherProxy,
},
fidl_fuchsia... | the_stack |
extern crate tcod;
extern crate rand;
use tcod::console::*;
use tcod::input::*;
use tcod::system;
use tcod::colors;
use tcod::colors::Color;
use tcod::chars;
use tcod::pathfinding::{Dijkstra, AStar};
use tcod::map::{Map, FovAlgorithm};
use tcod::image;
use tcod::namegen::Namegen;
use tcod::line::Line;
use tcod::noise:... | the_stack |
use crate::*;
use futures::executor::block_on;
use std::{
collections::{HashMap, VecDeque},
sync::Mutex,
};
#[cfg(feature = "tao")]
use tao::{
accelerator::Accelerator,
dpi::PhysicalSize,
event::{ElementState, Event as WEvent, MouseButton as WMouseButton, WindowEvent},
event_loop::{ControlFlow... | the_stack |
use angle;
/// Represents a point on the geographical surface of the Earth
#[derive(Debug)]
pub struct GeographPoint {
/// Geographical longitude
pub long: f64,
/// Geographical latitude
pub lat: f64,
}
impl GeographPoint {
pub fn anglr_sepr(&self, other_point: &GeographPoint) -> f64 {
ang... | the_stack |
use cgmath::Matrix4;
use cgmath::SquareMatrix;
use cgmath::Vector3;
use std::sync::Arc;
use vulkano::command_buffer::AutoCommandBufferBuilder;
use vulkano::command_buffer::CommandBuffer;
use vulkano::command_buffer::SubpassContents;
use vulkano::device::Queue;
use vulkano::format::Format;
use vulkano::framebuffer::Fram... | the_stack |
use super::mode::Async;
use super::output_result_ext::OutputResultExt;
use crate::memory::{frame::Frame, root_pending::RootPending, stack_page::StackPage};
use crate::{
error::{AllocError, JlrsError, JlrsResult, JuliaResult},
memory::{
frame::{GcFrame, MIN_FRAME_CAPACITY},
mode::private::Mode,
... | the_stack |
use super::*;
use serde::{
de::{EnumAccess, Error, SeqAccess, VariantAccess, Visitor},
ser::{Error as _, SerializeSeq},
Deserialize, Deserializer, Serialize, Serializer,
};
use std::fmt::Formatter;
/// Custom implementation to allow using the same visitor for VariantType as well as the discriminant
/// of ... | the_stack |
use std::cell::RefCell;
use std::cmp::{max, min};
use std::convert::TryFrom;
use std::rc::{Rc, Weak};
use std::time::Duration;
#[cfg(windows)]
use winapi::shared::minwindef::UINT;
#[cfg(windows)]
use winapi::um::timeapi::{timeBeginPeriod, timeEndPeriod};
/// A quantized `Duration`. This currently just produces 16 di... | the_stack |
use serde::Deserialize;
use std::io::{Error, ErrorKind, Read, Write};
use std::os::unix::io::{AsRawFd, RawFd};
use std::os::unix::net::{UnixListener, UnixStream};
use std::sync::{Arc, Mutex, RwLock};
use util::leak_bucket::LeakBucket;
use util::loop_context::{read_fd, EventNotifier, EventNotifierHelper, NotifierOperat... | the_stack |
#[macro_use]
extern crate log;
mod cargo_watch;
mod mdbook_bin;
use self::cargo_watch::*;
use clap::Shell;
use commandspec::*;
use diesel::connection::Connection;
use diesel::sqlite::SqliteConnection;
use failure::Error;
use log::LevelFilter;
use mdbook::MDBook;
use std::collections::HashSet;
use std::env;
use std::p... | the_stack |
use crate::context_stack::{
BindingInfo, BindingKind, BindingsIndex, BreakOrContinueIndex, ContextMetadata, LabelIndex,
LabelInfo, LabelKind,
};
use crate::declaration_kind::DeclarationKind;
use crate::early_errors::*;
use crate::error::{ParseError, Result};
use crate::Token;
use ast::arena;
use ast::source_ato... | the_stack |
use crate::module::helpers::TransactionRequestFiller;
use crate::module::map_err;
use anyhow::format_err;
use futures::future::TryFutureExt;
use futures::FutureExt;
use starcoin_abi_decoder::{decode_move_value, DecodedMoveValue};
use starcoin_abi_resolver::ABIResolver;
use starcoin_abi_types::{FunctionABI, ModuleABI, S... | the_stack |
#![no_std]
extern crate alloc;
use core::mem::size_of;
use core::alloc::Layout;
/// Page table flag indicating the entry is valid
pub const PAGE_PRESENT: u64 = 1 << 0;
/// Page table flag indiciating this page or table is writable
pub const PAGE_WRITE: u64 = 1 << 1;
/// Page table flag indiciating this page or ta... | the_stack |
use std::time::{Duration, Instant};
use crate::protocol::stats::*;
#[derive(Debug, Default)]
struct MessageStats {
pub message_count: u64,
pub packet_count: u64,
pub bytes_total: u64,
}
impl Stats for MessageStats {
type Measure = (u64, u64);
fn add(&mut self, (packets, bytes): Self::Measure) {
... | the_stack |
use super::*;
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
use state_processing::{
per_block_processing, per_block_processing::errors::ExitInvalid, BlockProcessingError,
BlockSignatureStrategy,
};
use types::{BeaconBlock, BeaconState, Epoch, EthSpec, SignedBeaconBlock};
// Default ... | the_stack |
use crate::mission::Utf8Filter;
#[cfg(test)]
use crate::mission::AF_ALL;
#[cfg(test)]
use crate::mission::UBF_GREEK;
#[cfg(test)]
use crate::mission::UBF_LATIN;
#[cfg(test)]
use crate::mission::UBF_NONE;
use std::slice;
use std::str;
/// This macro is useful for zero-cost conversion from &[u8] to &str. Use
/// this wi... | the_stack |
use arrow::datatypes::Schema;
use arrow::error::{ArrowError, Result as ArrowResult};
use arrow::ipc::{
convert, size_prefixed_root_as_message, writer, writer::EncodedData,
writer::IpcWriteOptions,
};
use std::{
convert::{TryFrom, TryInto},
fmt,
ops::Deref,
};
mod gen {
include!("arrow.flight.p... | the_stack |
use field::{Field, Content};
use ui::UI;
use ui::EndMessage;
use piston_window::*;
use common::{ParamType, MoveDestination, GameEndState};
use chrono::{DateTime, UTC, Duration};
enum RenderState {
// redraw picture on current buffer
First,
// redraw picture on next buffer
Second,
// needn't redra... | the_stack |
use crate::cli::app::arg_names::{
ARG_GLOB_NO_SKIP_UNSUPPORTED_EXTENSIONS, ARG_IMAGE_CRATE_FALLBACK, ARG_INPUT, ARG_INPUT_GLOB,
ARG_OUTPUT, ARG_OUTPUT_GLOB,
};
use crate::cli::common_dir::CommonDir;
use crate::cli::glob_base_dir::glob_builder_base;
use anyhow::{bail, Context};
use clap::ArgMatches;
use globwalk... | the_stack |
use futures::channel::oneshot;
use hyper::service::{make_service_fn, service_fn};
use hyper::Client;
use hyper::Server;
use specit::tokio_it as it;
use std::convert::Infallible;
use piping_server::piping_server::PipingServer;
use piping_server::req_res_handler::req_res_handler;
use std::net::SocketAddr;
type BoxError... | the_stack |
use super::{
disconnect_message::DisconnectMessageProtocol,
discovery::{DiscoveryAddressManager, DiscoveryProtocol},
feeler::Feeler,
identify::{IdentifyCallback, IdentifyProtocol},
ping::PingHandler,
};
use crate::{
network::{DefaultExitHandler, EventHandler},
services::protocol_type_checke... | the_stack |
use std::io::{self, Write};
use std::ops::Range;
use termcolor::{ColorSpec, WriteColor};
use crate::diagnostic::{LabelStyle, Severity};
use crate::files::{Error, Location};
use crate::term::{Chars, Config, Styles};
/// The 'location focus' of a source code snippet.
pub struct Locus {
/// The user-facing name of t... | the_stack |
//! A trait defining architecture independent address spaces.
use core::cmp::PartialEq;
use core::fmt;
use crate::error::KError;
use bit_field::BitField;
use x86::current::paging::{PDFlags, PDPTFlags, PTFlags};
use super::{Frame, PAddr, VAddr};
#[derive(Debug, PartialEq, Clone)]
pub struct TlbFlushHandle {
pub ... | the_stack |
use std::ops;
#[cfg(test)]
mod test {
use approx;
use super::*;
impl approx::AbsDiffEq for Vector4 {
type Epsilon = f32;
fn default_epsilon() -> f32 {
f32::default_epsilon()
}
fn abs_diff_eq(&self, other: &Vector4, epsilon: Self::Epsilon) -> bool {
... | the_stack |
use std::{
cell::Cell,
ffi::{OsStr, OsString},
};
// Third Party
use clap_lex::RawOsStr;
// Internal
use crate::builder::AppSettings as AS;
use crate::builder::{Arg, Command};
use crate::error::Error as ClapError;
use crate::error::Result as ClapResult;
use crate::mkeymap::KeyType;
use crate::output::fmt::Str... | the_stack |
use core::{fmt, hash, marker::PhantomData};
use super::{
state, task, timeout, utils,
wait::{WaitPayload, WaitQueue},
BadIdError, DrainSemaphoreError, GetSemaphoreError, Id, Kernel, PollSemaphoreError, Port,
SignalSemaphoreError, WaitSemaphoreError, WaitSemaphoreTimeoutError,
};
use crate::{time::Durat... | the_stack |
use std::{collections::HashMap, num::Wrapping};
use egg::{Id, RecExpr};
use rand::Rng;
use wasm_encoder::{Function, Instruction, MemArg};
use wasmparser::Operator;
use crate::module::PrimitiveTypeInfo;
use crate::mutators::peephole::dfg::StackType;
use crate::mutators::peephole::{Lang, EG};
use crate::{
error::Ei... | the_stack |
use crate::fns::FnOnce1;
use crate::stream::{Fuse, StreamExt};
use core::fmt;
use core::marker::PhantomData;
use core::pin::Pin;
use futures_core::future::{FusedFuture, Future};
use futures_core::ready;
use futures_core::stream::{FusedStream, Stream};
use futures_core::task::{Context, Poll};
#[cfg(feature = "sink")]
us... | the_stack |
extern crate eve;
use eve::indexes::*;
use eve::ops::{EstimateIter, OutputRounds, RoundHolder, Change};
use std::collections::HashMap;
#[test]
fn index_insert_check() {
let mut index = HashIndex::new();
index.insert(1,1,1);
index.insert(1,2,1);
index.insert(2,3,1);
index.insert(1,3,100);
assert... | the_stack |
use crate::error::TokenizerError;
use crate::tokenizer::base_tokenizer::{TokenIdsWithOffsets, TokenIdsWithSpecialTokens};
use crate::tokenizer::tokenization_utils::strip_accents;
use crate::tokenizer::tokenization_utils::{
clean_text, decompose_nfkc, is_whitespace, lowercase, replace_string, split_on_special_tokens... | the_stack |
use arc_swap::{ArcSwap, Guard};
use log::{error, info};
use once_cell::sync::Lazy;
use serde_derive::Deserialize;
use std::collections::{HashMap, HashSet};
use std::sync::Arc;
use tokio::fs::File;
use tokio::io::AsyncReadExt;
use toml;
use crate::errors::Error;
/// Globally available configuration.
static CONFIG: Laz... | the_stack |
use crate::AudioInfo;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use std::boxed::Box as Box_;
use std::mem;
use std::mem::transmute;
glib::wrapper! {
#[doc(alias = "GstAudioEncoder")]
pub struct AudioEncoder(Object<ff... | the_stack |
use {
anyhow::{Context, Result},
errors::ffx_bail,
ffx_config::get,
ffx_core::ffx_plugin,
ffx_daemon_log_args::LogCommand,
log::error,
notify::Watcher,
std::{
collections::VecDeque,
fs::File,
io::{self, BufRead, BufReader, Seek},
path::{Path, PathBuf},
... | the_stack |
use std::io::ErrorKind;
use std::sync::atomic::Ordering;
use std::time::Duration;
use hashbrown::HashMap;
use mio::{net::TcpStream, Events, Interest, Poll, Token};
use rand::{prelude::*, rngs::SmallRng};
use tungstenite::{handshake::MidHandshake, ClientHandshake, HandshakeError, WebSocket};
use crate::common::*;
use ... | the_stack |
use std::future::Future;
use std::io::{Error as IoError, SeekFrom};
use std::pin::Pin;
use std::task::{Context, Poll};
#[cfg(feature = "either")]
use either::Either as OtherEither;
use err_context::AnyError;
#[cfg(feature = "futures")]
use futures_util::future::Either as FutEither;
use pin_project::pin_project;
use se... | the_stack |
//! Common algorithms.
mod port_alloc;
use core::convert::TryInto;
use mundane::hash::Digest as _;
use mundane::hmac::HmacSha256;
use net_types::ip::{Ipv6Addr, Subnet};
pub(crate) use port_alloc::*;
/// The length in bytes of the `secret_key` argument to
/// [`compute_stable_interface_identifier`].
pub(crate) cons... | the_stack |
use flate2::{write::GzEncoder, GzBuilder};
use futures::future;
use headers::HeaderMapExt;
use hyper::header::{self, HeaderValue};
use hyper::rt::Future;
use hyper::service::service_fn;
use hyper::{Body, Method, Request, Response, Server, StatusCode};
use std::collections::HashMap;
use std::fs;
use std::io::{self, Writ... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.