text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use solana_program::msg; use crate::controller::position::PositionDirection; use crate::error::{ClearingHouseResult, ErrorCode}; use crate::math::amm::{calculate_quote_asset_amount_swapped, calculate_spread_reserves}; use crate::math::casting::{cast, cast_to_i128}; use crate::math::constants::PRICE_TO_PEG_PRECISION_RA...
the_stack
use std::collections::{HashMap, HashSet}; use std::fs::File; use std::ops::Range; use std::path::Path; use std::str::FromStr; use std::sync::Arc; use failure::{format_err, ResultExt}; use log::{debug, info}; use regex::{Regex, RegexBuilder}; use snips_nlu_ontology::{BuiltinEntityKind, IntentClassifierResult, Language}...
the_stack
// 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. This file may not be copied, modified, or distributed // except according to those terms. //! # Panic call ou...
the_stack
mod action; mod mode; mod view; pub use self::{action::Action, mode::Mode, view::View}; use crate::{ bookmarks, color, config::{Config, SharedConfig}, encoding::Encoding, gopher::{self, Type}, help, history, menu::Menu, terminal, text::Text, utils, BUG_URL, }; use std::{ io::{st...
the_stack
use crate::{sys, usr}; use crate::sys::allocator::PhysBuf; use crate::sys::net::Stats; use alloc::collections::BTreeMap; use alloc::sync::Arc; use alloc::vec::Vec; use bit_field::BitField; use core::sync::atomic::{AtomicUsize, Ordering}; use smoltcp::Result; use smoltcp::iface::{EthernetInterfaceBuilder, NeighborCache...
the_stack
use cfg_if::cfg_if; cfg_if! { if #[cfg(feature = "tfo")] { use tfo::TcpStream; use tfo::{ReadHalf, WriteHalf}; pub use tfo::TcpListener; } else { use tokio::net::TcpStream; use tokio::net::tcp::{ReadHalf,WriteHalf}; pub use tokio::net::TcpListener; } } cfg_i...
the_stack
use utralib::generated::*; use xous::MemoryRange; use susres::{RegManager, RegOrField, SuspendResume}; use llio::I2cStatus; use crate::api::*; use num_traits::*; pub const TLV320AIC3100_I2C_ADR: u8 = 0b0011_000; const I2C_TIMEOUT: u32 = 50; pub struct Codec { csr: utralib::CSR<u32>, fifo: MemoryRange, sus...
the_stack
use std::any::Any; use std::cell::RefCell; use std::rc::Rc; use crate::bonus_text_arg_handler::{ add_attack_text_args, add_bonus_text_args, add_prereq_text_args, }; use crate::item_callback_handler::sell_item_cb; use crate::{ItemActionMenu, MerchantWindow, RootView}; use sulis_core::io::{event, keyboard_event::Key...
the_stack
extern crate rustache; use rustache::{HashBuilder, Render}; use std::io::Cursor; // - name: No Interpolation // desc: Mustache-free templates should render as-is. // data: { } // template: | // Hello from {Mustache}! // expected: | // Hello from {Mustache}! #[test] fn test_spec_interpolation_none() { ...
the_stack
//! Code related to match expresions. These are sufficiently complex //! to warrant their own module and submodules. :) This main module //! includes the high-level algorithm, the submodules contain the //! details. use aster::ident::ToIdent; use build::{BlockAnd, BlockAndExtension, Builder}; use mir::*; use std::asci...
the_stack
use panic_halt as _; use core::cmp; use cortex_m_rt::entry; use stm32f1::stm32f103; use stm32f103::USB as USBRegs; use vcell::VolatileCell; #[allow(unused_imports)] use cortex_m_semihosting::hprintln; mod cursor; mod descr; mod gpio; mod pma; use cursor::{ReadCursor, WriteCursor}; static DEVICE_DESCR: descr::Devi...
the_stack
use crate::coo::CooMatrix; use crate::csc::CscMatrix; use crate::csr::CsrMatrix; use crate::pattern::SparsityPattern; use nalgebra::proptest::DimRange; use nalgebra::{Dim, Scalar}; use proptest::collection::{btree_set, hash_map, vec}; use proptest::prelude::*; use proptest::sample::Index; use std::cmp::min; use std::it...
the_stack
use crate::{ api_utils::{ get, get_all, get_hosts, post, put, wait_for_cmds, wait_for_cmds_success, SendCmd, SendJob, }, display_utils::{ display_cancelled, display_error, format_error, format_success, generate_table, wrap_fut, DisplayType, IntoDisplayType as _, }, error::Iml...
the_stack
use proc_macro2::TokenStream; use quote::{quote, ToTokens}; type Error = Box<dyn std::error::Error>; type Result<T, E = Error> = core::result::Result<T, E>; mod parser; #[derive(Debug, Default)] struct Output { pub subscriber: TokenStream, pub endpoint_publisher: TokenStream, pub endpoint_publisher_subsc...
the_stack
pub use crate::backend::ShaderModule; use { crate::{assert_error, OutOfMemory}, std::{ borrow::Cow, convert::TryFrom, fmt::{self, Debug, Display}, }, }; bitflags::bitflags! { /// Flags for each of graphics shaders. #[cfg_attr(feature = "serde-1", derive(serde::Serialize, ser...
the_stack
pub use super::*; /* Constants */ const DEBUG_DUMP_MERGE: bool = false; //dump merge results for debugging const MIN_ATTEMPT_ID: u32 = 1024; //minimal attempt ID /* Implementation details for SessionState */ type AttemptIdVector = PoolPtr<dyn Vector<u32>>; type OldRoundVector = Option<PoolPtr<dyn Vector<Poo...
the_stack
use core::ops::RangeInclusive; use s2n_quic_core::{ counter::{Counter, Saturating}, event, event::IntoEvent, frame::ack::EcnCounts, inet::ExplicitCongestionNotification, number::CheckedSub, random, time::{timer, Duration, Timer, Timestamp}, transmission, varint::VarInt, }; //= h...
the_stack
use core::borrow::Borrow; use std::collections::HashMap; use std::mem; use thiserror::Error; use curve25519_dalek::ristretto::CompressedRistretto; use curve25519_dalek::scalar::Scalar; use serde::{Deserialize, Serialize}; use zkvm::bulletproofs::BulletproofGens; use accounts::{Address, AddressLabel, Receiver, Sequenc...
the_stack
use redux_rs::Store; use std::sync::Arc; use crypto::hash::OperationHash; use tezos_messages::p2p::{ binary_message::MessageHash, encoding::{ current_head::{CurrentHeadMessage, GetCurrentHeadMessage}, mempool::Mempool, operation::{GetOperationsMessage, OperationMessage}, peer::...
the_stack
use std::any::Any; use std::mem::ManuallyDrop; use std::panic; use std::panic::{RefUnwindSafe, UnwindSafe}; use allo_isolate::IntoDart; use anyhow::Result; use lazy_static::lazy_static; use parking_lot::Mutex; use threadpool::ThreadPool; use crate::rust2dart::{Rust2Dart, TaskCallback}; use crate::support::{into_leak_...
the_stack
use dfn_core::{ api::{self, ic0, trap_with}, stable, }; use rand::Rng; use rand_pcg::Lcg64Xsh32; use serde::{Deserialize, Serialize}; use std::cell::RefCell; use std::mem; const ELEMENT_SIZE: usize = mem::size_of::<u64>(); const MEMORY_SIZE: usize = 1 << 30; // 1GiB. const MEMORY_LEN: usize = MEMORY_SIZE / ELE...
the_stack
extern crate bio_types; extern crate chrono; extern crate clap; extern crate itertools; extern crate num_cpus; extern crate rand; extern crate slog; extern crate slog_term; use bio_types::strand::Strand; use clap::{crate_authors, crate_version, App, AppSettings, Arg, ArgSettings}; use csv::Error as CSVError; use csv::...
the_stack
// bindgen /usr/include/linux/in.h --no-layout-tests /* automatically generated by rust-bindgen 0.58.1 */ pub const __BITS_PER_LONG: u32 = 64; pub const __FD_SETSIZE: u32 = 1024; pub const __UAPI_DEF_IF_IFCONF: u32 = 1; pub const __UAPI_DEF_IF_IFMAP: u32 = 1; pub const __UAPI_DEF_IF_IFNAMSIZ: u32 = 1; pub const __UAP...
the_stack
use derivative::Derivative; use smallvec::SmallVec; use std::borrow::Borrow; use std::cmp; use std::collections::HashSet; use std::hash::{Hash, Hasher}; use std::mem; use std::ops::{Deref, DerefMut}; use theon::query::{Intersection, Line, Plane}; use theon::space::{EuclideanSpace, FiniteDimensional, Scalar, Vector}; us...
the_stack
use core_foundation::dictionary::{CFDictionary, CFDictionaryRef}; use core_foundation::string::{CFString, CFStringRef}; use core_foundation::boolean::CFBoolean; use core_foundation::array::{CFArray, CFArrayRef, FromVoid}; use core_foundation::base::{TCFType, CFType, CFTypeRef, OSStatus}; use core_foundation::data::{CFD...
the_stack
use std::{ hash::{ Hash, Hasher, }, cmp::Ordering, os::raw::c_int, sync::Weak, }; use inotify_sys as ffi; use crate::fd_guard::FdGuard; bitflags! { /// Describes a file system watch /// /// Passed to [`Inotify::add_watch`], to describe what file system events /// ...
the_stack
use crate::prelude::*; use crate::FormatNodeFields; use rome_formatter::write; use rome_js_syntax::{JsxText, JsxTextFields}; use std::borrow::Cow; use std::ops::Range; use std::str::CharIndices; impl FormatNodeFields<JsxText> for FormatNodeRule<JsxText> { fn fmt_fields(node: &JsxText, f: &mut JsFormatter) -> Form...
the_stack
use log::LevelFilter; use neon::{ context::Context, handle::Handle, prelude::*, types::{JsNumber, JsString}, }; use opentelemetry::trace::{SpanContext, SpanId, TraceFlags, TraceId, TraceState}; use std::net::SocketAddr; use std::{fmt::Display, str::FromStr, time::Duration}; use temporal_sdk_core::{ ...
the_stack
use crate::{ buffer::NetworkBuffer, error::{Error, Result}, packet::{deserialize_packet_header, serialize_packet, Packet, PacketBody, PACKET_HEADER_SIZE}, send_bytes, PacketRecipient, }; use mio::{ net::{TcpListener, TcpStream}, Events, Poll, PollOpt, Ready, Token, }; use std::{ collections:...
the_stack
use crate::stats::StatsMssg; use rand::distributions::WeightedIndex; use rand::prelude::*; use std::collections::HashMap; use std::net::SocketAddr; use std::net::TcpStream; use std::sync::mpsc::Sender; use std::sync::Arc; use std::time; use std::time::Duration; use tokio::sync::RwLock; use tokio::task; #[derive(Debug,...
the_stack
use crate::descriptor::VectorKind; use crate::wit::{AuxImport, WasmBindgenAux}; use std::borrow::Cow; use std::collections::{HashMap, HashSet}; use walrus::{FunctionId, ImportId, TypedCustomSectionId}; #[derive(Default, Debug)] pub struct NonstandardWitSection { /// A list of adapter functions, keyed by their id. ...
the_stack
use anyhow::anyhow; use anyhow::bail; use anyhow::Error; use anyhow::Result; use std::path::PathBuf; use crate::arg_parser::CliArgs; use crate::cache::Cache; use crate::configuration::get_init_config_file_text; use crate::configuration::*; use crate::environment::Environment; use crate::plugins::output_plugin_config_d...
the_stack
use crate::{ target::Target, ty::{Dir, ProcType, PtrType, Type, TypeId, TypeKind}, }; use std::{ascii::escape_default, fmt::Display}; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ValueCommon { pub ty_id: TypeId, pub dir: Dir, } impl ValueCommon { pub fn new(ty_id:...
the_stack
use std::any::Any; use std::rc::Rc; #[cfg(feature = "csr")] use web_sys::Element; use super::scope::{AnyScope, Scope}; use super::BaseComponent; #[cfg(feature = "hydration")] use crate::dom_bundle::Fragment; #[cfg(feature = "csr")] use crate::dom_bundle::{BSubtree, Bundle}; #[cfg(feature = "csr")] use crate::html::No...
the_stack
use memmap::Mmap; use std::fs::File; use std::io::prelude::*; use std::io::BufWriter; const SEARCH: u8 = b'\n'; const MAX_BUF_SIZE: usize = 4 * 1024 * 1024; // 4 MiB pub fn reverse_file(path: &str, force_flush: bool) -> std::io::Result<()> { let mmap; let mut buf; let mut temp_path = None; { ...
the_stack
use std::{ collections::VecDeque, fmt, future::Future, io, mem, net, pin::Pin, rc::Rc, task::{Context, Poll}, }; use actix_codec::{AsyncRead, AsyncWrite, Decoder as _, Encoder as _, Framed, FramedParts}; use actix_rt::time::sleep_until; use actix_service::Service; use bitflags::bitflags; us...
the_stack
pub(in crate::schema) mod models; mod operations; pub(in crate) mod schema; use crate::error::{ ConstraintViolationError, ConstraintViolationType, InternalError, ResourceTemporarilyUnavailableError, }; use models::{GridPropertyDefinition, GridSchema, NewGridPropertyDefinition, NewGridSchema}; use operations::...
the_stack
use crate::io::prelude::*; use crate::io::{self, BufReader, BufWriter, ErrorKind, IoSlice, LineWriter, ReadBuf, SeekFrom}; use crate::mem::MaybeUninit; use crate::panic; use crate::sync::atomic::{AtomicUsize, Ordering}; use crate::thread; /// A dummy reader intended at testing short-reads propagation. pub struct Short...
the_stack
macro_rules! impl_reduction_float_arithmetic { ([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => { impl $id { /// Horizontal sum of the vector elements. /// /// The intrinsic performs a tree-reduction of the vector elements. /// That is, for an ...
the_stack
// // Copyright (c) 2019 Stegos AG // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, ...
the_stack
use crate::f64::consts; use crate::num::FpCategory as Fp; use crate::num::*; #[test] fn test_num_f64() { test_num(10f64, 2f64); } #[test] fn test_min_nan() { assert_eq!(f64::NAN.min(2.0), 2.0); assert_eq!(2.0f64.min(f64::NAN), 2.0); } #[test] fn test_max_nan() { assert_eq!(f64::NAN.max(2.0), 2.0); ...
the_stack
use crate::MirPass; use rustc_middle::mir::*; use rustc_middle::ty::TyCtxt; use smallvec::SmallVec; pub struct SeparateConstSwitch; impl<'tcx> MirPass<'tcx> for SeparateConstSwitch { fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { if tcx.sess.mir_opt_level() < 4 { return; ...
the_stack
use std::fs::{read_link, File, OpenOptions}; use std::io::{Stdin, Stdout}; use std::os::unix::io::{AsRawFd, FromRawFd}; use std::os::unix::net::{UnixListener, UnixStream}; use std::path::PathBuf; use std::sync::{Arc, Mutex}; use libc::{cfmakeraw, tcgetattr, tcsetattr, termios}; use machine_manager::machine::{PathInfo,...
the_stack
use crate::controls::ControlHandle; use crate::win32::window_helper as wh; use crate::win32::window::{RawEventHandler, unbind_raw_event_handler, bind_raw_event_handler_inner}; use crate::NwgError; use winapi::shared::windef::HWND; use std::{ptr, rc::Rc, cell::{RefCell, RefMut, Ref} }; use stretch::{ number::Number...
the_stack
use crate::cassandra::consistency::Consistency; use crate::cassandra::custom_payload::{CustomPayload, CustomPayloadResponse}; use crate::cassandra::error::*; use crate::cassandra::prepared::PreparedStatement; use crate::cassandra::result::CassResult; use crate::cassandra::util::Protected; use crate::cassandra::write_ty...
the_stack
extern crate proc_macro; use num_complex::Complex; use proc_macro2::{Span, TokenStream}; use quote::{quote, ToTokens}; use syn::{ parse::{Parse, ParseStream}, parse_macro_input, parse_quote, Error, Ident, ItemStruct, LitInt, Result, Token, }; struct Config { pub ty: Ident, pub comma_token2: Token![,], ...
the_stack
// #[macro_use] use bluetooth_hci as hci; use hci::{require_len, require_len_at_least}; use byteorder::{ByteOrder, LittleEndian}; use core::convert::{TryFrom, TryInto}; use core::fmt::{Debug, Formatter, Result as FmtResult}; use core::time::Duration; use crate::bluetooth::{event, gatt, opcode}; /// Vendor-specific ...
the_stack
use std::{ffi::c_void, fmt::Debug, pin::Pin}; use super::{ChildState, Nexus, Reason}; use crate::core::{BlockDeviceHandle, Cores, Mthread}; /// io channel, per core #[repr(C)] #[derive(Debug)] pub struct NexusChannel { inner: *mut NexusChannelInner, } #[repr(C)] pub(crate) struct NexusChannelInner { pub(cra...
the_stack
// === Standard Linter Configuration === #![deny(non_ascii_idents)] #![warn(unsafe_code)] // === Non-Standard Linter Configuration === #![warn(missing_copy_implementations)] #![warn(missing_debug_implementations)] #![warn(trivial_casts)] #![warn(trivial_numeric_casts)] #![warn(unused_import_braces)] #![warn(unused_qual...
the_stack
/// This file provides the `DirSize` struct which holds information on the sizes and the number of files of the cargo cache. /// When constructing the struct, the caches from the cache modules are used. /// The new() method does parallel processing to a bit of time use std::fmt; use crate::cache::caches::Cache; use cr...
the_stack
use futures::{future, future::BoxFuture, Stream, stream, future::FutureExt, stream::TryStreamExt}; use hyper::{Request, Response, StatusCode, Body, HeaderMap}; use hyper::header::{HeaderName, HeaderValue, CONTENT_TYPE}; use log::warn; #[allow(unused_imports)] use std::convert::{TryFrom, TryInto}; use std::error::Error;...
the_stack
//! A single Tectonic document. //! //! Every document is part of a [`crate::workspace::Workspace`]. At the moment //! workspaces can only contain a single document each, but in the future it //! might become possible for one workspace to contain multiple documents. //! //! This crate, on its own, does not provide docu...
the_stack
use std::{path::PathBuf, sync::Arc, time::Instant}; use winit::{ event::Event, event_loop::{ControlFlow, EventLoop}, }; use imgui::*; use legion::prelude::*; use crate::{ core::input::Input, graphics::{ self, material::Skybox, pipeline_manager::PipelineManager, resource...
the_stack
use log::*; use crate::{ sync::{atomics::AtomicBox, treiber::TreiberStack}, table::prelude::*, }; use std::{ sync::atomic::{AtomicU64, Ordering}, thread, }; use thread::ThreadId; use super::errors::*; use super::readset::ReadSet; use super::utils; use crate::sync::ttas::TTas; use std::cell::RefCell; ...
the_stack
use crate::point::{distance, Line, Point, Rotation}; use num::{cast, NumCast}; use std::cmp::{Ord, Ordering}; use std::f64::{self, consts::PI}; /// Computes the length of an arc. If `closed` is set to `true` then the distance /// between the last and the first point is included in the total length. pub fn arc_length<T...
the_stack
use num_integer::gcd; use std::any::TypeId; use std::collections::HashMap; use std::sync::Arc; use crate::{common::FftNum, fft_cache::FftCache, FftDirection}; use crate::algorithm::*; use crate::sse::sse_butterflies::*; use crate::sse::sse_prime_butterflies::*; use crate::sse::sse_radix4::*; use crate::Fft; use cra...
the_stack
use super::{Options, TypeLangValue}; use crate::{ context::inverse::{Inversible, LangSelection, Selection, TypeSelection}, object, syntax::{Container, Term, Type}, Context, Error, ErrorCode, Id, Indexed, Nullable, Object, ProcessingMode, Value, }; use generic_json::{JsonClone, JsonHash}; /// Compact the given term...
the_stack
#![no_std] #![feature(abi_x86_interrupt)] #![allow(dead_code)] #[macro_use] extern crate log; #[macro_use] extern crate vga_buffer; extern crate x86_64; extern crate spin; extern crate port_io; extern crate kernel_config; extern crate memory; extern crate apic; extern crate pit_clock; extern crate tss; extern crate ...
the_stack
//! Parsing for filtering expressions //! //! The parsing strategy is based on the following blog post: //! `<https://eyalkalderon.com/blog/nom-error-recovery/>` //! //! All high level parsing functions should: //! - always return Ok(_) //! - on error: //! - consume as much input as it makes sense so that we can tr...
the_stack
use { crate::{error::Error, format::ExtentInfo, properties::ExtentProperties, utils::RangeOps}, interval_tree::interval::Interval, std::convert::TryFrom, std::io::Write, std::ops::Range, zerocopy::AsBytes, }; #[derive(Debug, Clone)] pub struct Extent { /// storage_range is the offsets this ...
the_stack
use anyhow::{format_err, Context as _, Error}; use fidl::endpoints::{create_endpoints, ClientEnd}; use fidl_fuchsia_bluetooth::{Appearance, Uuid}; use fidl_fuchsia_bluetooth_le::{ AdvertisingData, AdvertisingHandleMarker, AdvertisingModeHint, AdvertisingParameters, ConnectionOptions, ManufacturerData, Periphera...
the_stack
use crate::next_port; use anvil::{spawn, NodeConfig}; use ethers::{ abi::Address, solc::{ artifacts::{BytecodeHash, Metadata}, ConfigurableContractArtifact, }, }; use foundry_cli_test_utils::{ ethers_solc::PathStyle, forgetest, forgetest_async, forgetest_ignore, forgetest_init, u...
the_stack
pub mod kernel_map_iterator; pub mod kernel_mapping; pub mod memory_range; use crate::{ arch::Architecture, auto_remote_syscalls::AutoRemoteSyscalls, emu_fs::EmuFileSharedPtr, kernel_abi::{ is_execve_syscall, syscall_instruction, syscall_number_for_brk, syscall_number_for_close, syscall...
the_stack
use geom::{Distance, PolyLine, Pt2D, Ring, EPSILON_DIST}; use crate::{ Direction, DrivingSide, Intersection, IntersectionID, Lane, LaneID, Map, Turn, TurnID, TurnType, }; /// Looks at all sidewalks (or lack thereof) in counter-clockwise order around an intersection. /// Based on adjacency, create a SharedSidewalk...
the_stack
pub mod enclosures; use crate::{ components::{attrs, tooltip, Placement}, extensions::MergeAttrs, font_awesome::{font_awesome, font_awesome_outline}, generated::css_classes::C, page::RecordChange, resize_observer, GMsg, }; use enclosures::{expansions, ss200nv, ss9012}; use iml_wire_types::{ ...
the_stack
use std::io::{Error, ErrorKind}; use std::path::{Path, PathBuf}; use std::sync::Arc; use local_encoding::{Encoder, Encoding}; use crate::cmd; use crate::compiler::{ Arg, CommandInfo, CompilationArgs, CompilationTask, InputKind, OutputKind, Scope, }; use std::fs; enum ParamValue<T> { None, Single(T), ...
the_stack
use std::{collections::HashMap, convert::TryInto}; use wonnx::utils::{attribute, graph, initializer, initializer_int64, model, node, tensor}; mod common; #[test] fn test_matmul_square_matrix() { let _ = env_logger::builder().is_test(true).try_init(); let n = 16; let mut input_data = HashMap::new(); le...
the_stack
//! Tools for blockchain validation & scanning //! //! # Examples //! //! ``` //! use tempfile::NamedTempFile; //! use zcash_primitives::{ //! consensus::{BlockHeight, Network, Parameters} //! }; //! //! use zcash_client_backend::{ //! data_api::{ //! BlockSource, WalletRead, WalletWrite, //! ch...
the_stack
use crate::block_utils::RefBlockChoice; use crate::cli_utils::setup_ctrlc_handler; use crate::file_reader::{FileReader, FileReaderParam}; use crate::file_utils; use crate::general_error::Error; use crate::hash_stats::HashStats; use crate::json_printer::{BracketType, JSONPrinter}; use crate::misc_utils; use crate::misc_...
the_stack
pub mod actor_types; mod connection_handler; #[cfg(test)] mod tests; use super::{ RtmpEndpointMediaData, RtmpEndpointPublisherMessage, RtmpEndpointRequest, StreamKeyRegistration, }; use crate::endpoints::rtmp_server::actor::connection_handler::ConnectionResponse; use crate::endpoints::rtmp_server::actor::internal...
the_stack
use lexgen::lexer; use thiserror::Error; pub type Loc = lexgen_util::Loc; pub type LexerError = lexgen_util::LexerError<LexicalError>; #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] pub enum Keyword { Or, And, Module, Import, Include, Def, As, Label, Break, ...
the_stack
#[cfg(feature = "blas")] extern crate blas_crate; #[cfg(feature = "lapack")] extern crate lapack_crate; #[cfg(all(target_os = "macos", any(feature = "blas", feature = "lapack")))] extern crate accelerate_src; #[cfg(all(not(target_os = "macos"), any(feature = "blas", feature = "lapack")))] extern crate openblas_src; #...
the_stack
use fnv::{FnvHashMap, FnvHashSet}; use std::borrow::Borrow; use std::fmt; use std::num::NonZeroUsize; use std::sync::{Arc, Mutex}; use std::time::{Duration, Instant}; use futures::{ channel::{mpsc, oneshot}, prelude::*, select, }; use libp2prs_core::{Multiaddr, PeerId, ProtocolId}; use libp2prs_runtime::t...
the_stack
use crate::util::{header_text, unwrap}; use crate::EventIter; use anyhow::{bail, Error}; use pulldown_cmark::{Alignment, Event, LinkType, Tag}; use std::fmt::Write; use std::mem; use url::Url; pub struct TextFormatter { url: Option<Url>, } impl TextFormatter { pub fn new(url: Option<Url>) -> TextFormatter { ...
the_stack
use core::convert::TryFrom; // Use binary integer part of the sines of integers (Radians) as constants: // for i from 0 to 63 do // K[i] := floor(232 × abs (sin(i + 1))) // end for // precomputed table #[allow(dead_code)] const K64: [u32; 64] = [ 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf...
the_stack
use crate::{gas_query, Precompile, PrecompileOutput, PrecompileResult, Return}; use alloc::{borrow::Cow, vec::Vec}; use primitive_types::{H160 as Address, U256}; pub mod add { use super::*; const ADDRESS: Address = crate::make_address(0, 6); pub const ISTANBUL: (Address, Precompile) = ( ADDRESS, ...
the_stack
mutable_transmutes, non_camel_case_types, non_snake_case, non_upper_case_globals )] use euclid::point2; use crate::{info, warn}; use std::ptr; use super::dpx_bmpimage::{bmp_include_image, check_for_bmp}; use super::dpx_dpxfile::{dpx_delete_temp_file, keep_cache}; use super::dpx_jpegimage::{check_for_jpeg...
the_stack
use std::{ collections::{HashMap, HashSet}, mem::size_of, time::Duration, }; use thiserror::Error; use zebra_chain::transaction::{self, UnminedTx, UnminedTxId, VerifiedUnminedTx}; use self::{eviction_list::EvictionList, verified_set::VerifiedSet}; use super::{config, downloads::TransactionDownloadVerifyE...
the_stack
use std::sync::Arc; use std::fmt::{Debug, Formatter}; use loopers_common::api::LooperSpeed; use itertools::Itertools; #[cfg(test)] mod tests { use super::*; #[test] fn test_new() { let sample = Sample::with_size(100); assert_eq!(100, sample.length()); assert_eq!(100, sample.buffer[...
the_stack
//! # Cpu //! //! This mod is to initialize vcpus to assigned state and drive them to run. //! //! ## Design //! //! This module offers support for: //! 1. Create vcpu. //! 2. According configuration, initialize vcpu registers and run. //! 3. Handle vcpu VmIn/VmOut events. //! 4. Handle vcpu lifecycle. //! //! ## Platf...
the_stack
quantity! { /// Volume rate (base unit cubic meter per second, m³ · s⁻¹). quantity: VolumeRate; "volume rate"; /// Dimension of volume rate, L³T⁻¹ (base unit cubic meter per second, m³ · s⁻¹). dimension: ISQ< P3, // length Z0, // mass N1, // time Z0, // el...
the_stack
//! # Direct Memory Access Controller //! //! This library provides a type-safe API with compile-time guarantees //! that the peripheral and individual DMA channels are correctly configured //! before launching a DMA transfer. //! //! This module currently supports most basic DMA //! functions, including memory-to-memo...
the_stack
#![deny(missing_docs)] // TODO: // - Use UnparkEvent once in-flight passes some threshold // - Conditionally depend on tokio-core #[macro_use] extern crate futures; extern crate futures_spawn; extern crate futures_mpsc; extern crate tokio_core; use futures::{Future, Stream, IntoFuture, Async, AsyncSink, Sink, Poll};...
the_stack
use crate::{ components::{font_awesome::*, modal}, dependency_tree::{build_direct_dag, traverse_graph, DependencyDAG, Deps, Rich}, extensions::{MergeAttrs as _, NodeExt as _, RequestExt as _}, generated::css_classes::C, key_codes, sleep_with_handle, GMsg, }; use futures::channel::oneshot; use iml_wi...
the_stack
extern crate ring; use byteorder::{WriteBytesExt, LittleEndian}; use ring::aead; use ring::aead::{SealingKey, OpeningKey, Algorithm}; use ring::rand::{SecureRandom, SystemRandom}; const MAX_NONCE: u64 = ::std::u64::MAX; static ALGORITHM: &'static Algorithm = &aead::AES_128_GCM; lazy_static! { static ref RAND: S...
the_stack
use ::ipc; use ::{Error, Result}; use ::server::swiboe; use mio::tcp::{TcpListener, TcpStream}; use mio::unix::{UnixListener, UnixStream}; use mio; use std::io; use std::net; use std::path::Path; use std::str::FromStr; use std::sync::{Arc, Mutex}; use threadpool::ThreadPool; // Number of threads to use for handling IO...
the_stack
use bulletproofs::BulletproofGens; use curve25519_dalek::scalar::Scalar; use curve25519_dalek::{ constants::RISTRETTO_BASEPOINT_COMPRESSED, ristretto::CompressedRistretto, traits::Identity, }; use merlin::Transcript; use musig::{Multisignature, Signature}; use rand::Rng; use zkvm::{ Anchor, Commitment, Contrac...
the_stack
use data_structures::indexed_vec::{Idx, IndexVec}; use mir::*; use std::collections::HashMap; use std::u32; use syntax::ast; use syntax::codemap::Span; use syntax::ext::base::ExtCtxt; use syntax::ptr::P; pub struct Builder<'a, 'b: 'a> { cx: &'a ExtCtxt<'b>, cfg: CFG, state_machine_kind: StateMachineKind, ...
the_stack
use std::error::Error; use automerge_protocol as amp; use crate::{ mutation::MutationTracker, state_tree::{OptimisticStateTree, ResolvedPath, StateTree}, value_ref::RootRef, InvalidPatch, MutableDocument, Path, Value, }; /// Tracks the possible states of the frontend /// /// What does this mean and w...
the_stack
extern crate env_logger; extern crate robots; use std::any::Any; use std::sync::{Arc, Mutex}; use std::sync::mpsc::{channel, Sender}; use std::time::Duration; use robots::actors::{Actor, ActorSystem, ActorCell, ActorContext, ActorRef, Props}; #[derive(Debug, PartialEq)] enum Res { Ok, Err, } ///////////////...
the_stack
use std::collections::HashMap; use std::fs::{create_dir, File}; use std::io::{Read, Write}; use std::mem::size_of; use std::path::PathBuf; use util::byte_code::ByteCode; use util::reader::BufferReader; use util::unix::host_page_size; use crate::device_state::{DeviceStateDesc, VersionCheck}; use crate::errors::{ErrorK...
the_stack
use error_chain::bail; use crate::{ config::{ChardevType, CmdParser, MachineType, VmConfig}, errors::{Result, ResultExt}, temp_cleaner::TempCleaner, }; use util::unix::parse_uri; use util::{ arg_parser::{Arg, ArgMatches, ArgParser}, unix::limit_permission, }; use std::os::unix::net::UnixListener; ...
the_stack
use ic_crypto::{ecdsa_p256_signature_from_der_bytes, rsa_signature_from_bytes}; use ic_interfaces::crypto::{IngressSigVerifier, Signable}; use ic_types::crypto::BasicSig; use ic_types::{ crypto::{AlgorithmId, BasicSigOf, UserPublicKey}, messages::{WebAuthnEnvelope, WebAuthnSignature}, }; use std::convert::TryFr...
the_stack
use crate::config::filter::Filter; use crate::config::fs::{FsMatcherConfigManager, ROOT_NODE_NAME}; use crate::config::{ Defaultable, MatcherConfig, MatcherConfigDraft, MatcherConfigDraftData, MatcherConfigEditor, MatcherConfigReader, }; use crate::error::MatcherError; use crate::validator::MatcherConfigValidat...
the_stack
pub use futures_signals::{signal::Signal, signal_vec::SignalVec}; pub use paste::paste; pub use silkenweb_dom::{ attribute::{AsAttribute, Attribute}, element::{Element, ElementBuilder, GenericElementBuilder}, tag, tag_in_namespace, }; pub use wasm_bindgen::{intern, JsCast, JsValue, UnwrapThrowExt}; pub use ...
the_stack
use std::fmt; use std::collections::VecDeque; use pest::prelude::*; use super::*; impl_rdp! { grammar! { module = _{ soi ~ statement* ~ eoi } // conditional is technically an expression too but it can be used as a statement // without a semicolon as well statement = { declaration...
the_stack
pub mod display_token; pub mod json; use std::error::Error; use crate::arena::Arena; use crate::core::Size; use display_token::{write_tokens, DisplayToken, RecTok}; /// The possible ways an insertion could fail #[derive(Debug, Clone, Eq, PartialEq, Hash)] pub enum InsertError { /// Inserting the node would cause...
the_stack
use std::fmt; /// Underlying variable representation. type RawVar = u16; /// A [de Bruijn index], which represents a variable counting the number of /// binders between a variable occurrence and the binder that introduced the /// variable. /// /// For example: /// /// | Representation | Example (S combinator) | /...
the_stack
use crate::prelude::*; use core::convert::{TryFrom, TryInto}; use core::fmt; use core::str::FromStr; use serde::{Deserialize, Serialize}; use tendermint_proto::Protobuf; use ibc_proto::ibc::core::channel::v1::{ Channel as RawChannel, Counterparty as RawCounterparty, IdentifiedChannel as RawIdentifiedChannel, ...
the_stack
//! The Tauri updater. //! //! The updater is focused on making Tauri's application updates **as safe and transparent as updates to a website**. //! //! Instead of publishing a feed of versions from which your app must select, Tauri updates to the version your server tells it to. This allows you to intelligently update...
the_stack