text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use std::cell::RefCell; use std::cmp::max; use std::fmt::Formatter; use thread_local::CachedThreadLocal; use crate::skim::Movement::{Match, Skip}; use crate::util::{char_equal, cheap_matches}; ///! The fuzzy matching algorithm used by skim ///! ///! # Example: ///! ```edition2018 ///! use fuzzy_matcher::FuzzyMatcher;...
the_stack
use std::iter::Iterator; use super::ast::*; use super::token::{TokenSpan, Lit}; use super::lex::Lexer; use std::mem::swap; use super::token::Token; use super::Span; use super::super::storage::SqlType; use std::collections::HashMap; use super::lex; // ====================================================================...
the_stack
use crate::array::*; use crate::bit_protocols::*; use crate::fixed_point::*; use crate::float_subroutines::*; use crate::ieee::*; use crate::integer::*; use crate::local_functions::*; use crate::slice::*; use core::ops::{Add, Div, Mul, Neg, Sub}; use scale::alloc::*; use scale::*; /* This gives floating point arithmet...
the_stack
use super::*; use crate::SERVER_CONFIG; use crate::{util::time::epoch_us, Metric}; use std::future::Future; use std::sync::atomic::Ordering; pub(super) async fn etcd_wrap< E: KeyhouseImpl + 'static, T, F: Future<Output = etcd_rs::Result<T>>, >( method: &'static str, fut: F, ) -> Result<T> { // ...
the_stack
use geom::{Rect,Px}; #[derive(Copy,Clone)] pub struct Colour(u32); impl Colour { pub fn from_argb32(argb32: u32) -> Colour { Colour(argb32) } pub fn from_rgb(r: u8, g: u8, b: u8) -> Colour { let argb32 = 0 << 24 | (r as u32) << 16 | (g as u32) << 8 | (b as u32); Colour( argb32 ) } //pub fn black() -> Colour { ...
the_stack
use crate::bridged_type::{fn_arg_name, BridgedType, StdLibType, TypePosition}; use crate::codegen::generate_swift::SwiftFuncGenerics; use crate::parse::{HostLang, TypeDeclaration}; use crate::{ParsedExternFn, TypeDeclarations, SWIFT_BRIDGE_PREFIX}; use quote::ToTokens; use std::collections::HashSet; use std::ops::Deref...
the_stack
use proc_macro2::{Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree}; use quote::{ToTokens, TokenStreamExt as _}; use crate::Punctuated; /// The declaration of a Rust type. /// /// **Example input:** /// /// ```no_run /// struct MyUnitStruct; /// struct MyTupleStruct(i32, f32); /// struct...
the_stack
pub mod errors; pub mod iter; pub mod tokens; /// It should be noted that indentation checks do not verify that mixed /// spaces and tabs do not depend on the size of a tab stop for correctness. use regex::{Regex, Captures, FindCaptures}; use std::char; use std::cmp; use std::iter::Peekable; use unicode_names; use s...
the_stack
use std::any::TypeId; use std::sync::Arc; use num_complex::Complex; use num_integer::div_ceil; use crate::array_utils; use crate::common::{fft_error_inplace, fft_error_outofplace}; use crate::{Direction, Fft, FftDirection, FftNum, Length}; use super::{AvxNum, CommonSimdData}; use super::avx_vector; use super::avx_v...
the_stack
#[cfg(test)] mod tests; static JOB_UPDATE_SCHEMA_NAME: &'static str = "iglu:com.snowplowanalytics.\ factotum/job_update/jsonschema/1-0-0"; static TASK_UPDATE_SCHEMA_NAME: &'static str = "iglu:com.snowplowanalytics.\ factotum/...
the_stack
use ::desync::*; use flo_canvas::*; use flo_binding::*; use flo_binding::binding_context::*; use futures::*; use futures::task; use futures::task::{Poll, Context}; use std::pin::*; use std::sync::*; use std::ops::Deref; /// /// The binding canvas is a canvas that can have an attached rendering /// function. It will ...
the_stack
#![feature(backtrace)] #![warn( // missing_copy_implementations, missing_debug_implementations, // missing_docs, trivial_numeric_casts, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results, clippy::pedantic, )] // from https://github.com/rust-unofficial/patterns/blob/master/anti_pa...
the_stack
#[cfg(not(feature = "std"))] use std::prelude::v1::*; use std::boxed::Box; use std::fmt::Debug; use internal::*; use internal::IResult::*; use util::ErrorKind; use traits::{AsChar,InputLength,InputIter}; use std::mem::transmute; use std::ops::{Range,RangeFrom,RangeTo}; use traits::{Compare,CompareResult,Slice}; #[inl...
the_stack
use std::cell::RefMut; use std::cmp::max; use std::collections::HashMap; use std::convert::identity; use std::mem::size_of; use arbitrary::{Arbitrary, Unstructured}; use bumpalo::Bump; use itertools::Itertools; use lazy_static::lazy_static; use libfuzzer_sys::fuzz_target; use solana_program::account_info::AccountInfo;...
the_stack
use std::cell::RefCell; use std::os::raw::{c_int, c_void}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Weak}; use crate::{Interface, Main, Proxy, RawEvent}; use wayland_commons::filter::Filter; use wayland_commons::user_data::UserData; use wayland_commons::wire::ArgumentType; use wayland_common...
the_stack
use std::{ convert::TryFrom, fmt::{Debug, Error, Formatter}, sync::Arc, }; use futures::channel::oneshot; use libc::c_void; use nix::errno::Errno; use spdk_sys::{ spdk_bdev_desc, spdk_bdev_free_io, spdk_bdev_io, spdk_bdev_nvme_admin_passthru_ro, spdk_bdev_read, spdk_bdev_reset, ...
the_stack
use crate::RngExt; use cfmt_a::{ fmt::{Error, FormattingFlags, StrWriter, StrWriterMut}, formatcp, test_utils::{ALL_ASCII, ALL_ASCII_ESCAPED}, utils::saturate_range, wrapper_types::{AsciiStr, PWrapper}, }; use arrayvec::ArrayString; use fastrand::Rng; use core::{fmt::Write, ops::Range}; #[deriv...
the_stack
//! Contains some useful primitives that can be inserted into r-trees. //! //! Use these objects if only the geometrical properties (position and size) //! are important. If additional data needs to be stored per object, consider //! implementing `SpatialObject`. use crate::boundingrect::BoundingRect; use crate::kerne...
the_stack
use whitebox_lidar::*; use crate::tools::*; // use whitebox_common::structures::Point3D; use std; use std::env; use std::fs::File; use std::io::prelude::*; use std::io::BufWriter; use std::io::{Error, ErrorKind}; use std::path; use std::process::Command; use std::u16; /// This tool can be used to print basic informati...
the_stack
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow( clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal, clippy::upper_case_acronyms )] #![cfg_attr(feature = "dox", feature(doc_cfg))] #[allow(unused_imports)] use libc::{ c_char, c_double, c_flo...
the_stack
use crate::arch::x86_64::mm::paging::{BasePageSize, PageSize, PageTableEntryFlags}; use crate::arch::x86_64::mm::{paging, virtualmem}; use crate::arch::x86_64::mm::{PhysAddr, VirtAddr}; use crate::x86::io::*; use core::{mem, ptr, slice, str}; /// Memory at this physical address is supposed to contain a pointer to the ...
the_stack
use super::*; use crate::base::{Bytes, Range}; use crate::html::{LocalName, Namespace}; use crate::parser::{ Lexeme, LexemeSink, NonTagContentLexeme, ParserDirective, ParserOutputSink, TagHintSink, TagLexeme, TagTokenOutline, }; use crate::rewritable_units::{ DocumentEnd, Serialize, ToToken, Token, TokenCap...
the_stack
use makepad_render::*; use makepad_microserde::*; use crate::textbuffer::*; use crate::tokentype::*; #[derive(Clone, Debug, PartialEq, SerBin, DeBin)] pub struct TextCursor { pub head: usize, pub tail: usize, pub max: usize } impl TextCursor { pub fn has_selection(&self) -> bool { self.head !...
the_stack
use crate::client::{build_client, WMClient}; use crate::config::action::Action; use crate::config::application::Application; use crate::config::key_action::KeyAction; use crate::config::key_press::{KeyPress, Modifier, ModifierState}; use crate::Config; use evdev::uinput::VirtualDevice; use evdev::{EventType, InputEvent...
the_stack
use super::*; use actix_web::{dev::Body, http::StatusCode, test, web, web::Bytes, App}; use openmls::group::create_commit::Proposals; use openmls_rust_crypto::OpenMlsRustCrypto; use openmls_traits::types::SignatureScheme; use tls_codec::{TlsByteVecU8, TlsVecU16}; #[actix_rt::test] async fn test_list_clients() { le...
the_stack
// Copyright (c) 2013-2014 The Rust Project Developers. // Copyright (c) 2015-2018 The rust-hex Developers. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option....
the_stack
use std::marker::PhantomData; use byteorder::{ByteOrder, LittleEndian, BigEndian, ReadBytesExt}; use serde::{ de::{ self, DeserializeSeed, EnumAccess, IntoDeserializer, MapAccess, SeqAccess, VariantAccess, Visitor, DeserializeOwned, }, }; use paste::paste; use crate::serialization::error::Error; use crate...
the_stack
use { crate::{ diagnostics::{Diagnostics, Event}, enums::{ ClockCorrectionStrategy, ClockUpdateReason, FrequencyDiscardReason, InitializeRtcOutcome, Role, SampleValidationError, TimeSourceError, Track, WriteRtcOutcome, }, MonitorTrack, PrimaryTrack...
the_stack
use crate::types::*; use core::{ cell::Cell, fmt::{self, Debug}, mem, ptr::NonNull, slice, }; use libsodium_sys::{ sodium_allocarray, sodium_free, sodium_init, sodium_mlock, sodium_mprotect_noaccess, sodium_mprotect_readonly, sodium_mprotect_readwrite, }; #[derive(Clone, Copy, Debug, Part...
the_stack
use super::{ autograd::{Autograd, Backward, Parameter, ParameterD, Variable, VariableD, VariableGradientD}, optimizer::Optimizer, }; use crate::{ buffer::{float::FloatBuffer, Buffer}, device::Device, linalg::DotBias, ops::{Im2Col, KernelArgs, KernelKind}, result::Result, rust_shaders, ...
the_stack
use cosmwasm_std::{ entry_point, to_binary, to_vec, Binary, ContractResult, CosmosMsg, Deps, DepsMut, Env, MessageInfo, QueryRequest, QueryResponse, Reply, Response, StdError, StdResult, SubMsg, SystemResult, }; use crate::errors::ReflectError; use crate::msg::{ CapitalizedResponse, ChainResponse, Cust...
the_stack
use crate::client::ServerName; use crate::key; use crate::msgs::base::{PayloadU16, PayloadU8}; use crate::msgs::codec::{Codec, Reader}; use crate::msgs::enums::{CipherSuite, ProtocolVersion}; use crate::msgs::handshake::CertificatePayload; use crate::msgs::handshake::SessionID; use crate::suites::{SupportedCipherSuite,...
the_stack
use super::cidr::{PrintMode, SPACING}; use super::commands::{BreakPointId, GroupName}; use super::PrintCode; use crate::interpreter_ir as iir; use crate::structures::names::{CompGroupName, GroupQIN}; use calyx::ir::Id; use std::collections::HashMap; use std::collections::HashSet; use std::rc::Rc; pub struct Counter(u...
the_stack
use super::*; use quote::ToTokens; /// Convert a trait object reference into a reference to a Boxed trait fn dedynify(ty: &mut Type) { if let Type::Reference(ref mut tr) = ty { if let Type::TraitObject(ref tto) = tr.elem.as_ref() { if let Some(lt) = &tr.lifetime { if lt.ident =...
the_stack
use image::*; use num::NumCast; use std::ops::Index; use num::traits::Bounded; use math::utils::*; use math::affine::Affine2D; use num::traits::ToPrimitive; pub enum InterplateType { Nearest, Bilinear } pub fn resize_nearest<T: Pixel>(src: &Image<T>, width: u32, height: u32) -> Image<T> { let mut dst = Im...
the_stack
use crate::avm2::Error; use flate2::read::*; use flate2::Compression; use gc_arena::Collect; use std::cell::Cell; use std::cmp; use std::convert::{TryFrom, TryInto}; use std::fmt::{self, Display, Formatter}; use std::io::prelude::*; use std::io::{self, Read, SeekFrom}; use std::str::FromStr; #[derive(Clone, Collect, D...
the_stack
use std::borrow::Borrow; use std::cmp::Ordering; use std::collections::HashMap; use std::fmt; use std::hash::Hash; use std::hash::Hasher; use std::iter::FromIterator; use std::iter::FusedIterator; use std::ptr::NonNull; use std::rc::Rc; use std::convert::AsRef; use crate::linked_list::{IntoIter as LinkedListIntoIter, ...
the_stack
use std::{ cell::{Cell, UnsafeCell}, fmt, marker::PhantomData, mem::{self, MaybeUninit}, slice::from_raw_parts_mut, sync::{ atomic::{AtomicBool, AtomicUsize, Ordering}, Arc, }, }; #[derive(Debug)] #[repr(align(128))] struct ProducerCacheline { /// Index position of curre...
the_stack
use qt_widgets::q_abstract_item_view::SelectionMode; use qt_widgets::QAction; use qt_widgets::QDockWidget; use qt_widgets::QLineEdit; use qt_widgets::QMainWindow; use qt_widgets::QMenu; use qt_widgets::QPushButton; use qt_widgets::QTreeView; use qt_widgets::QWidget; use qt_gui::QStandardItemModel; use qt_core::{Conte...
the_stack
use rain_core::comm::ExecutorToGovernorMessage; use rain_core::logging::events; use rain_core::types::id::empty_governor_id; use rain_core::{errors::*, sys::*, types::*, utils::*}; use std::collections::HashMap; use std::net::SocketAddr; use std::path::{Path, PathBuf}; use std::process::exit; use std::rc::Rc; use std::...
the_stack
use crate::xetex_scaledmath::Scaled; use crate::xetex_xetex0::free_node; use derive_more::{Deref, DerefMut}; use crate::xetex_consts::{BreakType, GlueOrder, GlueSign}; use crate::xetex_ini::MEM; use crate::xetex_xetexd::{TeXInt, TeXOpt}; #[derive(Clone, Debug)] pub(crate) enum Node { Char(Char), Text(TxtNode)...
the_stack
use enc::command::{Command, ComputeDistanceCode, InitCommand, GetInsertLengthCode, GetCopyLengthCode, CombineLengthCodes, PrefixEncodeCopyDistance, CommandCopyLen, BrotliDistanceParams}; use super::{BrotliEncoderParams, kHashMul32,kHashMul64, kHashMul64Long, BrotliHasherParams, kInvalidMatch, kDistanceCacheIndex, kDist...
the_stack
use postgres_ffi::nonrelfile_utils::clogpage_precedes; use postgres_ffi::nonrelfile_utils::slru_may_delete_clogsegment; use std::cmp::min; use anyhow::Result; use bytes::{Buf, Bytes, BytesMut}; use tracing::*; use crate::relish::*; use crate::repository::*; use crate::walrecord::*; use postgres_ffi::nonrelfile_utils:...
the_stack
use std::io::{Cursor, Read}; use std::str::from_utf8; use byteorder::ReadBytesExt; use byteorder::LE; use log::info; use crate::common::Color; use crate::encoding::read_cur_shift_jis; use crate::engine_constants::EngineConstants; use crate::framework::context::Context; use crate::framework::error::GameError::Resource...
the_stack
use super::super::control::*; use super::super::viewmodel::*; use super::super::controller::*; use super::super::viewmodel_update::*; use flo_binding::*; use futures::*; use futures::stream; use futures::stream::{BoxStream}; use futures::task::{Poll, Context}; use std::iter; use std::pin::*; use std::sync::*; use st...
the_stack
use super::style::ast::{Block, Rule, RuleContent, Scope, ScopeContent, StyleAttribute}; use nom::{ branch::alt, bytes::complete::{is_not, tag, take_while}, character::complete::one_of, combinator::{map, map_res, opt}, error::{context, convert_error, ErrorKind, ParseError, VerboseError}, multi::{...
the_stack
use super::client::Client; use super::score::{PeerAction, Score, ScoreState}; use super::sync_status::SyncStatus; use crate::Multiaddr; use crate::{rpc::MetaData, types::Subnet}; use discv5::Enr; use serde::{ ser::{SerializeStruct, Serializer}, Serialize, }; use std::collections::HashSet; use std::net::{IpAddr,...
the_stack
use core::cell::Cell; use kernel::collections::list::{List, ListLink, ListNode}; use kernel::hil::time::{self, Alarm, Ticks, Time}; use kernel::utilities::cells::OptionalCell; use kernel::ErrorCode; #[derive(Copy, Clone)] struct TickDtReference<T: Ticks> { /// Reference time point when this alarm was setup. r...
the_stack
use std::{cell::RefCell, convert::TryFrom, rc::Rc}; use crate::{ env::SequentialFileRef, log_format::{RecordType, BLOCK_SIZE, HEADER_SIZE, MAX_RECORD_TYPE}, result::{Error, ErrorType, Result}, slice::Slice, util::{coding, crc32c}, }; pub const EOF: i32 = MAX_RECORD_TYPE + 1; /// Returned whenever...
the_stack
use self::na::Vector3; use whitebox_common::algorithms; use whitebox_lidar::*; use crate::na; use whitebox_common::structures::{DistanceMetric, FixedRadiusSearch3D, Point2D, Point3D, RectangleWithData}; use crate::tools::*; use whitebox_vector::*; use kdtree::distance::squared_euclidean; use kdtree::KdTree; use num_cpu...
the_stack
#[allow(missing_docs)] // documentation missing in model #[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct UpdateReplicationJobOutput {} impl std::fmt::Debug for UpdateReplicationJobOutput { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut formatter =...
the_stack
use std::collections::HashSet; use std::path::{Path, PathBuf}; use std::fs::File; use std::os::unix::fs::{PermissionsExt, MetadataExt}; use quire::validate as V; #[cfg(feature="containers")] use libmount::{BindMount, Remount}; use quick_error::ResultExt; use config::read_config; use config::containers::Container as C...
the_stack
use crate::build_rs::BuildInfo; use crate::gen::common::{self, ProbeGeneratorBase, ProviderTraitGeneratorBase}; use crate::gen::r#static::native_code::{self, ProcessedProviderTrait}; use crate::gen::NativeLib; use crate::spec::{ProbeArgSpecification, ProbeSpecification, ProviderSpecification}; use crate::TracersResult;...
the_stack
//! Implement a userspace PCI device driver for the virtio vhost-user device. use std::str::FromStr; use std::sync::Arc; use std::time::{Duration, Instant}; use anyhow::{anyhow, bail, Context, Result}; use base::{info, Event}; use data_model::DataInit; use memoffset::offset_of; use resources::Alloc; use vfio_sys::*; ...
the_stack
use super::Bytes; use crate::block_number::BlockNumber; use crate::crypto::{ pubkey_to_address, PubKey, Signature, HASH_BYTES_LEN, PUBKEY_BYTES_LEN, SIGNATURE_BYTES_LEN, }; use crate::reserved_addresses::{ABI_ADDRESS, AMEND_ADDRESS, STORE_ADDRESS}; use cita_types::traits::LowerHex; use cita_types::{clean_0x, Addres...
the_stack
use kurbo::common as coeffs; use kurbo::{Affine, BezPath, PathEl, Point, Vec2}; use crate::util; /// Parameters for a hyperbezier curve. /// /// A hyperbezier is a curve defined by curvature as a function of arclength. /// It is similar to the Spiro curve in this way, but for some of the parameter /// space the funct...
the_stack
use {Mapping, MappingError}; use errors::flatten_causes; use failure::{Fallible, ResultExt}; use nix::unistd; use serde_derive::{Deserialize, Serialize}; use std::collections::HashMap; use std::collections::hash_map::Entry; use std::fs; use std::io::{self, Read, Write}; use std::os::unix::io::{AsRawFd, FromRawFd}; use ...
the_stack
mod source_links; use std::path::PathBuf; use crate::{ ast::{Statement, TypedStatement}, build::Module, config::{DocsPage, PackageConfig}, docs::source_links::SourceLinker, format, io::OutputFile, pretty, }; use askama::Template; use itertools::Itertools; const MAX_COLUMNS: isize = 65; co...
the_stack
//! Contains various validation functions: //! - to support to validate different parts of the chain //! - to ensure consistency of chain //! - to support multipass validation use std::time::Duration; use chrono::TimeZone; use tezos_protocol_ipc_client::{ProtocolRunnerConnection, ProtocolServiceError}; use thiserror:...
the_stack
use std::{ cmp::Ordering, os::raw::{c_char, c_double, c_int, c_void}, ptr, string::FromUtf8Error, sync::RwLock, thread::{self, ThreadId}, }; use conv::ConvUtil; use once_cell::sync::Lazy; use crate::ffi; use crate::topology::SystemCommunicator; use crate::{with_uninitialized, with_uninitialize...
the_stack
mod utils; use fluence_faas::FluenceFaaS; use fluence_faas::IType; use pretty_assertions::assert_eq; use once_cell::sync::Lazy; use serde_json::json; use std::rc::Rc; static ARG_CONFIG: Lazy<fluence_faas::TomlFaaSConfig> = Lazy::new(|| { let mut arguments_passing_config = fluence_faas::TomlFaaSConfig::l...
the_stack
pub mod debug_handlers; pub mod handlers; mod key_codes; mod key_stream; pub mod premade; pub mod test_helpers; extern crate alloc; extern crate no_std_compat; extern crate spin; pub use crate::handlers::{ProcessKeys, HandlerResult}; pub use crate::key_codes::{AcceptsKeycode, KeyCode, UserKey}; use crate::key_stream::...
the_stack
use crate::*; //------------------------------------------------------------------------------ #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] /// BoundingBox2D, an axis aligned bounding box within 2D space pub struct BoundingBox2D { min: Point2D, max: Point2D, } impl BoundingBox2D { /// Cr...
the_stack
//! Utilities /// Convenient SI-prefixed unit formatting. pub trait SiUnit { fn si_unit<'a>(&'a self, unit: &'a str) -> SiUnitDisplay<'a, Self> { self.si_unit_prec(unit, 3) } fn si_unit_prec<'a>(&'a self, unit: &'a str, prec: usize) -> SiUnitDisplay<'a, Self>; } pub struct SiUnitDisplay<'a, T: ?S...
the_stack
use std::path::{Path, PathBuf}; use anyhow::Context; use s3::{bucket::Bucket, creds::Credentials, region::Region}; use tokio::io::{self, AsyncWriteExt}; use crate::{ config::S3Config, remote_storage::{strip_path_prefix, RemoteStorage}, }; const S3_FILE_SEPARATOR: char = '/'; #[derive(Debug, Eq, PartialEq)] ...
the_stack
use std::sync::Arc; use tidb_query_common::{storage::IntervalRange, Result}; use tidb_query_datatype::{ codec::{batch::LazyBatchColumnVec, data_type::*}, expr::{EvalConfig, EvalContext}, }; use tidb_query_expr::{RpnExpression, RpnExpressionBuilder}; use tipb::{Expr, FieldType, Projection}; use crate::interfac...
the_stack
extern crate num_traits; extern crate quicksilver; #[macro_use] extern crate rustpython_vm; #[cfg(not(target_arch = "wasm32"))] extern crate clap; #[cfg(not(target_arch = "wasm32"))] extern crate fs_extra; #[cfg(not(target_arch = "wasm32"))] extern crate walkdir; #[cfg(not(target_arch = "wasm32"))] use clap::{Arg, App,...
the_stack
use super::{ErrorKind, Manifest, Result}; use kube::{ api::{Api, PostParams}, client::APIClient, config::load_kube_config, }; use serde::Serialize; use tokio::process::Command; use k8s_openapi::api::authorization::v1::{ ResourceAttributes, SelfSubjectAccessReview, SelfSubjectAccessReviewSpec, }; struc...
the_stack
mod analyze; mod convert; mod helper; mod iter; use crate::{ semantics::{analyze::SemanticCheck, Expression, Found, Kind, Transition}, utils::naming::Name, Error, }; impl Expression for Transition<'_> { fn current_state(&self) -> Name { self.from.name.into() } fn next_state(&self) -> Name { self.to.name.in...
the_stack
use anyhow::{bail, Result}; use log::warn; use std::fmt::Display; use crate::util::to_si_bytesize; #[derive(Default)] pub struct Rom { pub title: String, pub manufacturer_code: [u8; 4], pub cgb_flag: CgbFlag, pub new_licensee_code: [u8; 2], pub sgb_flag: bool, pub cartridge_type: CartridgeType...
the_stack
use std::marker::PhantomData; use std::ops::{Index, IndexMut}; use greenwasm_structure::types::*; use greenwasm_structure::instructions::*; use greenwasm_structure::modules::*; use DEBUG_EXECUTION; // TODO: util module #[derive(Clone, PartialEq)] pub struct TypedIndexVec<T, IndexT> { data: Vec<T>, _marker: Ph...
the_stack
use rt::{JsEnv, JsRawValue, JsValue, JsString, JsItem, JsIterator, JsScope, JsType, JsArgs}; use rt::{JsDescriptor, JsPreferredType, JsFnMode, JsHandle}; use rt::{GC_VALUE}; use gc::*; use ::{JsResult, JsError}; use ir::IrFunction; use ir::builder::{Block, Ir}; use std::rc::Rc; use rt::stack::StackFrame; use syntax::Na...
the_stack
use crate::constants; use crate::metric; use crate::metric::Metadata; use crate::source::nonblocking::{write_all, BufferedPayload, PayloadErr}; use crate::source::{TCPStreamHandler, TCP}; use crate::util; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use mio; use serde_avro; use std::io::{Cursor, Read}; use ...
the_stack
use hex::FromHex; use lazy_static::lazy_static; lazy_static! { /// Array of `addr` (v1) test vectors containing IP addresses. /// /// These test vectors can be read by [`zebra_network::protocol::external::Codec::read_addr`]. /// They should produce successful results containing IP addresses. // Fro...
the_stack
use themis::keys::SymmetricKey; use themis::secure_cell::SecureCell; mod context_imprint { use super::*; #[test] fn initialization() { assert!(SecureCell::with_key(SymmetricKey::new()).is_ok()); assert!(SecureCell::with_key(&[]).is_err()); } #[test] fn roundtrip() { le...
the_stack
use std::{collections::HashSet, fmt::Debug, iter}; use crate::{ key::PianoKey, midi::{ChannelMessage, ChannelMessageType}, note::NoteLetter, pitch::{Pitch, Pitched, Ratio}, tuning::KeyboardMapping, }; // Universal System Exclusive Messages // f0 7e <payload> f7 Non-Real Time // f0 7f <payload> f7 ...
the_stack
extern crate proc_macro; extern crate regex; #[macro_use] extern crate lazy_static; #[macro_use] extern crate quote; use proc_macro2::Span; use proc_macro_hack::proc_macro_hack; use regex::Regex; use syn::{Token, Error}; fn consume_expr(s: &str) -> (&str, String) { lazy_static! { // bad hack regex to look ...
the_stack
use std::collections::HashMap; #[cfg(feature = "sqlite")] use diesel::dsl::insert_or_ignore_into; use diesel::dsl::{insert_into, max}; use diesel::prelude::*; use crate::error::InternalError; use crate::state::merkle::node::Node; #[cfg(feature = "sqlite")] use crate::state::merkle::sql::store::models::sqlite; #[cfg(f...
the_stack
use chrono::offset::Utc; use chrono::DateTime; use std::{fmt::Display}; use std::time::{Instant, SystemTime}; use crate::LabResult; use crate::suite_context::SuiteContext; use crate::reporter::{ Reporter, report_to_stdout }; #[derive(Debug, Clone, Copy)] pub enum Speed { Fast, OnTime, Slow } #[derive(Debug...
the_stack
use nom::{be_u32, be_u64}; use nfs::types::*; #[derive(Debug,PartialEq)] pub enum Nfs4RequestContent<'a> { PutFH(Nfs4Handle<'a>), GetFH, SaveFH, PutRootFH, ReadDir, Commit, Open(Nfs4RequestOpen<'a>), Lookup(Nfs4RequestLookup<'a>), Read(Nfs4RequestRead<'a>), Write(Nfs4RequestWri...
the_stack
extern crate jni_sys; use log::LogLevel::{Debug, Trace}; use jni_sys::{JNIEnv, jclass, jint, jlong, jfloat, jdouble, jobject, jmethodID, jfieldID, jstring, jobjectArray, jsize}; use jvmti_sys::{jvmtiEnv, jthread, jvmtiFrameInfo, jvmtiLocalVariableEntry, jvmtiError}; use std::ptr; use util; use std::os::raw::{c_char, c...
the_stack
use crate::{ opcode::{ execute_cpi_cpd, execute_ini_ind, execute_ldi_ldd, execute_outi_outd, execute_pop_16, BlockDir, Opcode, Prefix, }, smallnum::{U1, U2, U3}, tables::{ lookup16_r12, lookup8_r12, HALF_CARRY_ADD_TABLE, HALF_CARRY_SUB_TABLE, OVERFLOW_ADD_TABLE, OVERFLOW_...
the_stack
use super::crossroads::Crossroads; use super::handlers::{self, Par, Handlers, MakeHandler, SendMethod, LocalMethod}; use super::info::{IfaceInfo, MethodInfo, PropInfo, Annotations, Argument, Access, EmitsChangedSignal}; use dbus::{arg, Message}; use super::MethodErr; use dbus::arg::{Arg, Variant, Append, IterAppend}; u...
the_stack
use std::collections::{BTreeSet, HashMap, HashSet}; use std::env; use std::ffi::OsString; use std::path::{Path, PathBuf}; use std::process::{self, Command, ExitStatus}; use std::str; use anyhow::{bail, Context, Error}; use cargo_util::{exit_status_to_string, is_simple_exit_code, paths, ProcessBuilder}; use log::{debug...
the_stack
use crate::native_types::{Arithmetic, Witness}; use indexmap::IndexMap; use noir_field::FieldElement; use super::general_optimiser::GeneralOpt; // Optimiser struct with all of the related optimisations to the arithmetic gate // Is this more of a Reducer than an optimiser? // Should we give it all of the gates? // Hav...
the_stack
use std::sync::Arc; use crate::{ lua_engine::LuaRuntime, prelude::*, rendergraph::{ face_routine::FaceRoutine, grid_routine::GridRoutine, point_cloud_routine::PointCloudRoutine, wireframe_routine::WireframeRoutine, }, }; use egui::{FontDefinitions, Style}; use egui_wgpu_backend::{Render...
the_stack
extern crate serde; extern crate serde_json; extern crate toml; use serde::ser::Serialize; use serde_json::Value as Json; use toml::{to_string_pretty, Value as Toml}; fn to_json(toml: toml::Value) -> Json { fn doit(s: &str, json: Json) -> Json { let mut map = serde_json::Map::new(); map.insert("ty...
the_stack
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::sorted_map::SortedMap; use rustc_hir as hir; use rustc_hir::def_id::LocalDefId; use rustc_hir::definitions; use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor}; use rustc_hir::*; use rustc_index::vec::{Idx, IndexVec}; use rustc_session::Sessi...
the_stack
use crate::architecture::*; use crate::loader::*; use crate::memory::backing::Memory; use log::warn; use std::collections::BTreeMap; use std::fs::File; use std::io::Read; use std::path::{Path, PathBuf}; /// The address where the first library will be loaded const DEFAULT_LIB_BASE: u64 = 0x4000_0000; /// The step in ad...
the_stack
#[macro_use] extern crate log; extern crate alloc; extern crate port_io; extern crate spin; use alloc::vec::Vec; use port_io::Port; use spin::Mutex; static PS2_PORT: Mutex<Port<u8>> = Mutex::new(Port::new(0x60)); static PS2_COMMAND_PORT: Mutex<Port<u8>> = Mutex::new(Port::new(0x64)); /// clean the PS2 data port (0x6...
the_stack
use crate::api::Match; use crate::bytesearch::charset_contains; use crate::cursor; use crate::cursor::{Backward, Direction, Forward}; use crate::exec; use crate::indexing::{AsciiInput, ElementType, InputIndexer, Utf8Input}; use crate::insn::{CompiledRegex, Insn, LoopFields}; use crate::matchers; use crate::matchers::Ch...
the_stack
use crate::did_resolve::DIDResolver; use crate::jsonld::REVOCATION_LIST_2020_V1_CONTEXT; use crate::one_or_many::OneOrMany; use crate::vc::{Credential, CredentialStatus, Issuer, VerificationResult, URI}; use async_trait::async_trait; use bitvec::prelude::Lsb0; use bitvec::slice::BitSlice; use bitvec::vec::BitVec; use c...
the_stack
use crate::component::chunk::Entry; use crate::component::entry::TxEntry; use crate::try_or_return_with_snapshot; use crate::{error::Reject, service::TxPoolService}; use ckb_async_runtime::Handle; use ckb_channel::{select, Receiver}; use ckb_error::Error; use ckb_snapshot::Snapshot; use ckb_store::ChainStore; use ckb_t...
the_stack
use columnvalueops::{ColumnValueOps, ColumnValueOpsExt}; use databaseinfo::DatabaseInfo; use databasestorage::{DatabaseStorage, Group}; use super::sexpression::{BinaryOp, UnaryOp, SExpression}; mod aggregate; use self::aggregate::*; mod groupbuckets; use self::groupbuckets::GroupBuckets; enum SourceType<'a, ColumnVa...
the_stack
use std::fs; use std::io::Read; mod cgroup1; mod cgroup2; #[derive(Debug)] pub enum CgroupError { IOErr(std::io::Error, String), NixErr(nix::Error), NotMounted, } impl std::fmt::Display for CgroupError { fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { let msg = match self {...
the_stack
use crate::MirPass; use rustc_data_structures::fx::FxIndexMap; use rustc_index::bit_set::BitSet; use rustc_index::vec::IndexVec; use rustc_middle::mir::*; use rustc_middle::ty::{self, TyCtxt}; const MAX_NUM_BLOCKS: usize = 800; const MAX_NUM_LOCALS: usize = 3000; pub struct NormalizeArrayLen; impl<'tcx> MirPass<'tcx...
the_stack
use crate::test::*; #[test] fn dyn_to_dyn_unsizing() { test! { program { #[lang(unsize)] trait Unsize<T> {} #[object_safe] trait Principal {} #[object_safe] trait OtherPrincipal {} #[object_safe] trait GenericP...
the_stack
#[repr(C)] #[derive(Default)] pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>); impl<T> __IncompleteArrayField<T> { #[inline] pub fn new() -> Self { __IncompleteArrayField(::std::marker::PhantomData) } #[inline] pub unsafe fn as_ptr(&self) -> *const T { ::std::mem:...
the_stack
use super::super::octets::{ Compose, EmptyBuilder, FromBuilder, IntoBuilder, OctetsBuilder, ParseError, ShortBuf, }; #[cfg(feature = "serde")] use super::super::octets::{DeserializeOctets, SerializeOctets}; #[cfg(feature = "master")] use super::super::str::Symbol; use super::builder::{DnameBuilder, FromStrError...
the_stack
use super::utils::{Update, *}; use crate::bot::command::*; use crate::database::Gallery; use crate::utils::get_message_url; use crate::*; use anyhow::{Context, Result}; use chrono::{Duration, Utc}; use futures::{FutureExt, TryFutureExt}; use std::convert::TryInto; use std::future::Future; use teloxide::types::*; use te...
the_stack