text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
#![forbid(unsafe_code)] use crate::{StorageReader, StorageServiceServer}; use anyhow::Result; use claim::{assert_matches, assert_none, assert_some}; use diem_crypto::{ed25519::Ed25519PrivateKey, HashValue, PrivateKey, SigningKey, Uniform}; use diem_infallible::RwLock; use diem_types::{ account_address::AccountAddr...
the_stack
use crate::{ device::AllowedIp, Backend, Device, DeviceUpdate, InterfaceName, Key, PeerConfig, PeerConfigBuilder, PeerInfo, PeerStats, }; use netlink_packet_core::{ NetlinkMessage, NetlinkPayload, NLM_F_ACK, NLM_F_CREATE, NLM_F_EXCL, NLM_F_REQUEST, }; use netlink_packet_generic::GenlMessage; use netlink_pac...
the_stack
use css::Value; use dom::NodeType; use font::Font; use layout::{BoxType, Dimensions, ImageData, LayoutBox, LayoutInfo, Rect, Text}; use float::Floats; use std::ops::Range; use std::collections::{HashMap, VecDeque}; use std::cmp::max; use gdk_pixbuf::PixbufExt; use gdk_pixbuf; use app_units::Au; #[derive(Clone, Debu...
the_stack
use super::events_from_chunks; use clap::{App, Arg, ArgGroup, ArgMatches, SubCommand}; use futures::{try_join, SinkExt, Stream, StreamExt, TryStreamExt}; use nanoid::nanoid; use serde_json; use std::sync::Arc; use tokio::io::{stdin, stdout, AsyncWrite}; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream...
the_stack
use std::collections::BTreeMap; use thiserror::Error; use crate::{ common::{ crypto::{ hash::Hash, signature::{PublicKey, Signature}, }, namespace::Namespace, sgx::ias::AVR, version::Version, }, consensus::{ beacon::EpochTime, ...
the_stack
use std::borrow::BorrowMut; use std::cmp; use std::collections::HashSet; use std::collections::VecDeque; use std::sync::Arc; use fail::fail_point; use hashbrown::HashMap; use log::debug; use parking_lot::{Mutex, RwLock}; use crate::file_pipe_log::ReplayMachine; use crate::log_batch::{ Command, CompressionType, Ke...
the_stack
use std::sync::Arc; use tink_core::{ keyset::{insecure, Handle}, TinkError, }; use tink_proto::{key_data::KeyMaterialType, KeyData}; #[test] fn test_new_handle() { tink_mac::init(); let kt = tink_mac::hmac_sha256_tag128_key_template(); let kh = Handle::new(&kt).unwrap(); let ks = insecure::keys...
the_stack
use core::convert::TryFrom; use crate::parser::Stream; pub fn parse(data: &[u8], code_point: u32) -> Option<u16> { // This subtable supports code points only in a u16 range. let code_point = u16::try_from(code_point).ok()?; let mut s = Stream::new(data); s.advance(6); // format + length + language ...
the_stack
#![doc(hidden)] use std::{mem, slice}; use std::os::raw::{c_char, c_void}; use buffer::AudioBuffer; use api::consts::*; use api::{self, AEffect, ChannelProperties}; use editor::{Rect, KeyCode, Key, KnobMode}; use host::Host; use event::Event; /// Deprecated process function. pub fn process_deprecated(_effect: *mut ...
the_stack
use complex::Complex; use gate::Gate; use ket::Ket; use matrix::Matrix; /// The identity gate, not mutating the state at all. #[allow(unused)] pub fn identity(width: usize) -> Gate { let m = Matrix::identity(Ket::size(width)); Gate::new(width, m) } /// The Hadamard gate. /// /// See [Wikipedia](https://en.w...
the_stack
use ::core::sync::atomic::{AtomicUsize}; module_define!{ arch, [], init } fn init() { // Start the FDT bus enumeration, informing it of the interrupt controller fdt_devices::init(interrupts::get_intc); } #[path="../armv7/fdt_devices.rs"] mod fdt_devices; //mod backtrace_dwarf; pub mod memory; pub mod sync { use...
the_stack
use std::io; use std::fs::OpenOptions; use std::path::{Path, PathBuf}; use std::ops::{Deref, DerefMut}; #[cfg(unix)] use std::os::unix::io::AsRawFd; #[cfg(windows)] use std::os::windows::io::AsRawHandle; #[cfg(windows)] use std::os::windows::fs::OpenOptionsExt; #[cfg(unix)] mod unix_specific_apis { extern "sys...
the_stack
use super::lasso::*; use super::select_tool_model::*; use crate::menu::*; use crate::tools::*; use crate::model::*; use crate::style::*; use flo_ui::*; use flo_canvas::*; use flo_binding::*; use flo_animation::*; use flo_animation::{HasBoundingBox}; use futures::*; use futures::stream; use futures::stream::{BoxStream...
the_stack
use futures::{Async, Future, Poll}; use std::sync::Arc; pub use self::builder::DeviceBuilder; pub use self::long_queue_policy::LongQueuePolicy; pub use self::request::DeviceRequest; pub(crate) use self::command::Command; // `metrics`モジュール用に公開されている use self::thread::{DeviceThreadHandle, DeviceThreadMonitor}; use crat...
the_stack
use chrono::Utc; use futures::stream::{select_all, FuturesUnordered}; use futures_util::{sink::SinkExt, stream::StreamExt}; use log::Level; use log::{error, info}; use rusqlite::Connection; use serde::Serialize; use std::fmt::Debug; use std::sync::Arc; use std::time::Duration; use tokio::sync::{broadcast, Mutex}; use t...
the_stack
// // Tested: // // ✔ pass a TokioCt to a function that takes exec: `impl Spawn` // ✔ pass a &TokioCt to a function that takes exec: `&impl Spawn` // ✔ pass a &TokioCt to a function that takes exec: `impl Spawn` // ✔ pass a &TokioCt to a function that takes exec: `impl Spawn + Clone` // ✔ pass a Arc<To...
the_stack
use crate::ser::ScratchSpace; use core::{ alloc::Layout, borrow::{Borrow, BorrowMut}, fmt, mem::MaybeUninit, ops, ptr::NonNull, slice, }; /// A vector view into serializer scratch space. pub struct ScratchVec<T> { ptr: NonNull<T>, cap: usize, len: usize, } impl<T> Drop for Scra...
the_stack
use crate::resolver::Resolver; use regex::Regex; use sha1::{Digest, Sha1}; use std::{cell::RefCell, path::Path, rc::Rc}; use swc_common::{SourceMap, Span, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_utils::quote_ident; use swc_ecma_visit::{noop_fold_type, Fold, FoldWith}; lazy_static! { pub static ref RE_CSS_MODULE...
the_stack
use core; use core::mem::size_of; use core::alloc::{Layout, GlobalAlloc}; use alloc::vec::Vec; use mmu::{PageTable, MapSize, PTBits}; use safecast::SafeCast; /* Number of PE directories */ const IMAGE_NUMBEROF_DIRECTORY_ENTRIES: usize = 16; /* Machine types */ const IMAGE_FILE_MACHINE_AMD64: u16 = 0x8664; /* IMAGE_F...
the_stack
use std::f32; use std::mem; use std::os::raw::c_void; use std::path::Path; use std::ptr; use cgmath::{self, Array, InnerSpace, Matrix4, SquareMatrix, Vector4, Zero}; use gl; use gl::types::*; use hyperplane::Hyperplane; use math; use polychora::{Definition, Polychoron}; use program::Program; use tetrahedron::Tetrahed...
the_stack
use crate::args::{Child, WidgetArgs}; use impl_tools_lib::fields::{Fields, FieldsNamed, FieldsUnnamed}; use impl_tools_lib::{Scope, ScopeAttr, ScopeItem, SimplePath}; use proc_macro2::{Span, TokenStream}; use proc_macro_error::{emit_error, emit_warning}; use quote::{quote, TokenStreamExt}; use syn::spanned::Spanned; us...
the_stack
use exonum::{ blockchain::{BlockProof, IndexProof, Schema}, helpers::Height, merkledb::{ access::{Access, AccessError}, generic::{ErasedAccess, GenericAccess, GenericRawAccess}, Fork, IndexAddress, }, runtime::SnapshotExt, }; use jni::{ objects::JClass, sys::{jboolean...
the_stack
// We want to keep the names here #![allow(clippy::module_name_repetitions)] use super::{ BaseExpr, ConnectStmt, ConnectorDefinition, CreateStmt, CreateTargetDefinition, DeployEndpoint, DeployFlow, FlowDefinition, Value, }; use crate::{ ast::{ base_expr::Ranged, docs::{FlowDoc, ModDoc}, ...
the_stack
use flo_curves::*; use flo_curves::bezier::*; use flo_curves::bezier::path::*; use flo_curves::bezier::path::algorithms::*; fn circle_ray_cast(circle_center: Coord2, radius: f64) -> impl Fn(Coord2, Coord2) -> Vec<RayCollision<Coord2, ()>> { move |from: Coord2, to: Coord2| { let from = from - circle_cent...
the_stack
use crate::{ constraints::Constraints, polynomial::DensePolynomial, rational_expression::RationalExpression, }; use serde::Serialize; use std::{ cmp::Ordering, collections::{hash_map::DefaultHasher, BTreeMap, BTreeSet}, convert::TryInto, fs::File, hash::{Hash, Hasher}, io::prelude::*, it...
the_stack
use crate::cache::disk::DiskCache; use crate::client::connect_to_coordinator; use crate::commands::{do_compile, request_shutdown, request_stats}; use crate::coordinator::{CachepotCoordinator, CoordinatorMessage, DistClientContainer}; use crate::jobserver::Client; use crate::mock_command::*; use crate::test::utils::*; u...
the_stack
use std::fmt::Debug; use std::ops::Add; use std::ops::AddAssign; use common_arrow::arrow::compute::aggregate; use common_arrow::arrow::compute::aggregate::sum_primitive; use common_arrow::arrow::types::simd::Simd; use common_exception::ErrorCode; use common_exception::Result; use num::cast::AsPrimitive; use num::Num; ...
the_stack
use super::SqlSchemaDifferFlavour; use crate::{flavour::MysqlFlavour, pair::Pair, sql_schema_differ::ColumnTypeChange}; use native_types::MySqlType; use sql_schema_describer::{ walkers::{ColumnWalker, IndexWalker}, ColumnTypeFamily, }; impl SqlSchemaDifferFlavour for MysqlFlavour { fn can_rename_foreign_ke...
the_stack
extern crate petstore_api; #[allow(unused_extern_crates)] extern crate futures; #[allow(unused_extern_crates)] #[macro_use] extern crate swagger; #[allow(unused_extern_crates)] extern crate uuid; extern crate clap; extern crate tokio_core; use swagger::{ContextBuilder, EmptyContext, XSpanIdString, Has, Push, AuthData}...
the_stack
use super::core::libexecutor::block::{ClosedBlock, OpenBlock}; use cita_types::Address; use itertools::Itertools; use libproto::{ExecutedResult, Proof}; use std::cmp::min; use std::collections::BTreeMap; #[derive(Debug, Copy, Clone)] pub enum Priority { Proposal = 1, Synchronized = 2, BlockWithProof = 3, }...
the_stack
use anyhow::{Context, Error}; use graph::blockchain::BlockchainKind; use graph::data::subgraph::UnifiedMappingApiVersion; use graph::firehose::endpoints::FirehoseNetworkEndpoints; use graph::prelude::{ EthereumCallCache, LightEthereumBlock, LightEthereumBlockExt, StopwatchMetrics, }; use graph::slog::debug; use gra...
the_stack
#![no_std] extern crate alloc; #[macro_use] extern crate lazy_static; #[macro_use] extern crate log; extern crate irq_safety; extern crate atomic_linked_list; extern crate task; #[cfg(single_simd_task_optimization)] extern crate single_simd_task_optimization; use alloc::collections::VecDeque; use irq_safety::RwLockI...
the_stack
use log::*; use std::sync::Arc; use tornado_common_api::{Action, Map, Value}; use tornado_common_parser::ParserBuilder; use tornado_executor_common::{ExecutorError, StatelessExecutor}; use tornado_network_common::EventBus; const FOREACH_TARGET_KEY: &str = "target"; const FOREACH_ACTIONS_KEY: &str = "actions"; const FO...
the_stack
use chrono::prelude::*; use params::{FromValue, Map, Value}; use rs_es::error::EsError; use rs_es::operations::bulk::{Action, BulkResult}; use rs_es::operations::delete::DeleteResult; use rs_es::operations::mapping::{Analysis, MappingOperation, MappingResult, Settings}; use rs_es::operations::search::highlight::{Enco...
the_stack
// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either vers...
the_stack
Here are the rules taken from the official wiki: Attachment Completeness Each attachment point itctxt.framebuffer_objects must be complete according to these rules. Empty attachments (attachments with no image attached) are complete by default. If an image is attached, it must adhere to the following rules: The sour...
the_stack
//! Export, import, and use Ed25519 public keys. //! //! Avoid using this module, except as a short-term transitional convenience. //! //! We warn that each Ristretto public key corresponds to two Ed25519 //! public keys because ristretto involves a square root. As such, //! all methods provided here must be conside...
the_stack
use crate::internal::*; use crate::ops::cnn::padding::ComputedPaddedDim; use crate::ops::cnn::{KernelFormat, PoolSpec}; use crate::ops::nn::DataShape; use tract_ndarray::prelude::*; /* (N) (G) C H W Reshaped Input (N) (G) C HW Kernel (N) (G) OHkWk C Gemm (N) (G) OHkWk HW (Gemm:...
the_stack
use crate::Clip; use crate::Container; use crate::Extractable; use crate::MetaContainer; use crate::OperationClip; use crate::OverlayClip; use crate::TextHAlign; use crate::TextVAlign; use crate::TimelineElement; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandl...
the_stack
use crate::types::*; use ascii::{AsciiChar, AsciiStr, Chars}; use std::convert::TryFrom; use std::str::FromStr; use std::{iter::Peekable, ops::Range}; #[derive(Debug, Clone, PartialEq)] pub struct Token { pub kind: TokenKind, pub range: Range<usize>, } pub type LexerResult = Result<Token, String>; /// A lexe...
the_stack
// Copyright (C) 2020-2022 Metaverse.Network & Bit.Country . // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LIC...
the_stack
use std::collections::HashMap; use std::sync::Arc; use rust_i18n::t; use serde::{Deserialize, Serialize}; use tokio::sync::mpsc; use tokio::time; use tracing::{debug, error, info}; use crate::chat::{self, HandleMessage}; use crate::{config, error, events, switcher, user_manager, Noalbs}; pub struct ChatHandler { ...
the_stack
use crate::types::{Arch, CpuFamily}; const SIGILL: u32 = 4; const SIGBUS: u32 = 10; const SIGSEGV: u32 = 11; /// Helper to work with instruction addresses. /// /// Directly symbolicated stack traces may show the wrong calling symbols, as the stack frame's /// return addresses point a few bytes past the original call ...
the_stack
mod camera; pub use camera::*; // Much of this was directly based on: // https://github.com/adrien-ben/gltf-viewer-rs/blob/master/model/src/mesh.rs mod mesh; pub use mesh::*; use crate::{Buffer, BufferInfo, Context}; use ash::vk; use gltf::{ buffer::Buffer as GltfBuffer, mesh::{Reader, Semantic}, }; use std:...
the_stack
use crate::{ internal::{ epoch::{QuiesceEpoch, EPOCH_CLOCK}, gc::{GlobalSynchList, OwnedSynch, ThreadGarbage}, phoenix_tls::PhoenixTarget, read_log::ReadLog, starvation::{self, Progress}, write_log::WriteLog, }, read::ReadTx, rw::RwTx, stats, tx::{...
the_stack
macro_rules! decoder_function { ($preamble:block, $loop_preable:block, $eof:block, $body:block, $slf:ident, $src_consumed:ident, $dest:ident, $source:ident, $b:ident, $destination_handle:ident, $unread_handle:ident, $destination_check:ident, $name:ident, ...
the_stack
use super::{LinkedList, List, Priority, Task}; use crate::util::CachePadded; use core::{ cell::Cell, num::NonZeroUsize, convert::TryInto, fmt, mem::{size_of, transmute, MaybeUninit}, ptr::NonNull, sync::atomic::{spin_loop_hint, AtomicUsize, Ordering}, }; use lock_api::{Mutex, RawMutex}; ///...
the_stack
use core::{ cmp, fmt::Debug, marker::PhantomData, mem, ops::Not, ptr, sync::atomic::{fence, Ordering}, }; use embedded_dma::{StaticReadBuffer, StaticWriteBuffer}; #[macro_use] mod macros; // Note: In the future, it may make sense to restructure the DMA module. #[allow(clippy::module_incept...
the_stack
use super::{ cgroups, config::{Config, RepositoryType}, console::Request, error::Error, mount::{MountControl, MountInfo}, process::Launcher, repository::{DirRepository, MemRepository}, stats::ContainerStats, Container, ContainerEvent, Event, EventTx, ExitStatus, NotificationTx, Pid, ...
the_stack
use std::str::FromStr; use serde_json; use redis; use uuid::Uuid; #[allow(unused_imports)] use test; use std::collections::HashMap; /// Represents a Command that can be serde'd and sent over Redis. #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub enum Command { // Generic Commands; all instances mu...
the_stack
use core::convert::From; use core::{cmp, fmt, slice}; use capstone_sys::{ cs_m68k, cs_m68k_op, cs_m68k_op__bindgen_ty_1, m68k_address_mode, m68k_cpu_size, m68k_fpu_size, m68k_op_br_disp, m68k_op_mem, m68k_op_size, m68k_op_type, m68k_reg, m68k_size_type, }; // XXX todo(tmfink): create rusty versions pub use ca...
the_stack
use anyhow::Context; use byteorder::{ByteOrder, NativeEndian}; pub use crate::utils::nla::{DefaultNla, NlaBuffer, NlasIterator}; use crate::{ constants::*, parsers::{parse_string, parse_u32, parse_u8}, traits::{Emitable, Parseable}, DecodeError, }; pub const LEGACY_MEM_INFO_LEN: usize = 16; buffer!(...
the_stack
use once_cell::sync::Lazy; use std::cmp::max; use unicode_segmentation::UnicodeSegmentation; use crate::{ app::{App, AxisScaling}, canvas::{ drawing_utils::{get_column_widths, interpolate_points}, Painter, }, constants::*, units::data_units::DataUnit, utils::gen_util::*, }; use...
the_stack
use clang::source::SourceRange; use clang::token::{Token, TokenKind}; use clang::*; use clap::{crate_name, crate_version, App, Arg}; use regex::Regex; use std::fs::{self, read_to_string, File}; use std::io::{self, Write}; use std::path::{Path, PathBuf}; const LUADOC: &str = "@luadoc"; const NOLUADOC: &str = "@noluado...
the_stack
use crate::{ config::Config, dep::{DepKind, ResolvedDep}, error::{Error, Result}, project::RootDepsMap, }; use std::{collections::HashMap, fmt, io::Write}; pub type Node = usize; #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone)] pub struct Edge(pub Node, pub Node); impl Edge { pub fn ...
the_stack
mod tests; use std::{ collections::{BTreeMap, HashSet}, io, ops::Deref, sync::Arc, }; use thiserror::Error; use crate::{ block::{Block, ChainHistoryMmrRootHash, Height}, fmt::SummaryDebug, orchard, parameters::{Network, NetworkUpgrade}, primitives::zcash_history::{Entry, Tree, V1 ...
the_stack
mod sector_reader; use std::env; use std::fs::{File, OpenOptions}; use std::io; use std::io::{BufReader, Read, Seek, Write}; use anyhow::{anyhow, bail, Context, Result}; use ntfs::attribute_value::NtfsAttributeValue; use ntfs::indexes::NtfsFileNameIndex; use ntfs::structured_values::{ NtfsAttributeList, NtfsFileN...
the_stack
use crate::engine::{ fields::field::Field, location::{Int2D, Location2D, Real2D}, }; use cfg_if::cfg_if; use core::fmt::Display; use std::cmp; use std::hash::Hash; cfg_if! { if #[cfg(any(feature = "visualization", feature = "visualization_wasm", feature = "parallel"))] { use crate::utils::dbdashma...
the_stack
mod common; use std::{any::Any, convert::Infallible, time::Duration}; use futures_util::StreamExt; use matches::assert_matches; use mqtt3::{ proto::{ClientId, QoS}, ReceivedPublication, }; use mqtt_bridge::{ settings::{Direction, TopicRule}, BridgeControllerUpdate, }; use mqtt_broker::{ auth::{Ac...
the_stack
use super::dialogs::dialog_helpers; use super::dialogs::project_add_edit_dlg::Msg as MsgProjectAddEditDialog; use super::dialogs::project_add_edit_dlg::ProjectAddEditDialog; use super::dialogs::project_note_add_edit_dlg; use super::dialogs::project_note_add_edit_dlg::Msg as MsgProjectNoteAddEditDialog; use super::dialo...
the_stack
use std::{ cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd}, fmt, hash::{Hash, Hasher}, marker::PhantomData, str::FromStr, }; use arrayvec::ArrayString; use serde::{Deserialize, Serialize}; use stdweb::{Reference, UnsafeTypedArray}; use crate::{ objects::{HasId, SizedRoomObject}, traits::{T...
the_stack
mod test_context; #[cfg(test)] mod test_steps; #[cfg(test)] mod tests; use crate::workflows::definitions::{WorkflowDefinition, WorkflowStepDefinition}; use crate::workflows::steps::factory::WorkflowStepFactory; use crate::workflows::steps::{ StepFutureResult, StepInputs, StepOutputs, StepStatus, WorkflowStep, }; u...
the_stack
use super::*; use crate::parse::error::Category; use crate::Value; use std::io::Cursor; #[test] fn test_atoms_default() { let mut parser = Parser::from_str("foo-symbol :prefix-keyword postfix-keyword: #t #f #nil 100 -42 4.5"); for value in vec![ Value::symbol("foo-symbol"), Value::symb...
the_stack
mod crc; #[macro_use] mod macros; mod types; pub use self::crc::{crc8, crc16}; pub use self::types::{ErrorKind, ByteStream, ReadStream}; use nom::{self, IResult}; use metadata::{Metadata, metadata_parser}; use std::ops::{Add, AddAssign, BitAnd, BitOr, Mul, Sub, Shl, ShlAssign, Shr}; use std::io; /// An interface fo...
the_stack
use { async_utils::stream::FutureMap, fidl::endpoints::{Proxy, ServerEnd}, fidl_fuchsia_bluetooth_bredr as bredr, fidl_fuchsia_bluetooth_hfp::{CallManagerProxy, PeerHandlerMarker}, fidl_fuchsia_bluetooth_hfp_test as hfp_test, fuchsia_bluetooth::profile::find_service_classes, fuchsia_bluetoot...
the_stack
use assert_matches::assert_matches; use exonum::{ helpers::Height, runtime::{InstanceId, InstanceStatus, SnapshotExt, SUPERVISOR_INSTANCE_ID}, }; use exonum_explorer::BlockchainExplorer; use exonum_merkledb::{BinaryValue, ObjectHash}; use exonum_rust_runtime::{RustRuntime, ServiceFactory}; use exonum_testkit::{...
the_stack
use apollo_router::plugin::Plugin; use apollo_router::register_plugin; use apollo_router::services::ResponseBody; use apollo_router::services::{RouterRequest, RouterResponse}; use apollo_router::services::{SubgraphRequest, SubgraphResponse}; use futures::stream::BoxStream; use http::StatusCode; use schemars::JsonSchema...
the_stack
use std::cmp::{max, min, Ordering}; use std::collections::{btree_map, BTreeMap, HashMap}; use std::fmt::{Debug, Formatter}; use std::ops::Range; use itertools::Itertools; pub fn find_line_ranges(text: &[u8]) -> Vec<Range<usize>> { let mut ranges = vec![]; let mut start = 0; loop { match text[start...
the_stack
use crate::sys::event::{kevent_ts, kqueue, KEvent}; use futures::channel::oneshot; use lever::prelude::*; use pin_utils::unsafe_pinned; use std::future::Future; use std::io::{self, Read, Write}; use std::mem::MaybeUninit; use std::os::unix::io::{AsRawFd, RawFd}; use std::pin::Pin; use std::task::{Context, Poll}; use st...
the_stack
/// Interprets INTERCAL source. /// /// The evaluator is used when rick is called with `-i`, or when the compiler generates /// the output while compiling (in the constant-output case). use std::fmt::{ Debug, Display }; use std::io::Write; use std::u16; use err::{ Res, IE123, IE129, IE252, IE275, IE555, IE633, IE774,...
the_stack
#[cfg(windows)] extern crate winapi; mod shaders; mod math_util; mod gl; pub mod gl_util; pub mod util; mod intro; mod music; mod random; use core::mem::MaybeUninit; use core::panic::PanicInfo; use winapi::um::wingdi::{ ChoosePixelFormat, SwapBuffers, wglMakeCurrent, wglCreateContext, SetPixelFo...
the_stack
use crate::ast::{BlockStatement, Expression, Infix, Prefix, Program, Statement}; use crate::lexer::Lexer; use crate::token::Token; use std::mem; #[derive(PartialEq, Eq, PartialOrd, Ord, Clone)] pub enum Precedence { Lowest, Equals, // == LessGreater, // > or < Sum, // + Product, //...
the_stack
use std::{cell::RefCell, rc::Rc}; use crate::ast::{Ast, AstNode}; #[allow(unused_imports)] use crate::dump::dump_node; use crate::error::{Error, Result}; use miette::NamedSource; use tree_sitter::{Node, Parser, TreeCursor}; fn filter_ast<'a>(node: Node<'a>, kind: &str) -> Option<Node<'a>> { if node.kind() == kind...
the_stack
use crate::multihash::*; mod test_vectors { // SHA1, SHA256, SHA512 test vectors are copied from : https://www.di-mgt.com.au/sha_testvectors.html // BLAKE2B_512 test vectors are copied from : https://raw.githubusercontent.com/BLAKE2/BLAKE2/master/testvectors/blake2-kat.json use super::super::misc_utils; ...
the_stack
use ttf_parser::parser::{LazyArray32, Offset32, Offset}; use crate::{Face, GlyphInfo}; use crate::buffer::Buffer; use crate::plan::ShapePlan; use crate::aat::{Map, MapBuilder, FeatureType}; use crate::aat::feature_selector; use crate::tables::aat; use crate::tables::morx; use ttf_parser::GlyphId; pub fn compile_flags...
the_stack
use crate::{ as_u16, constants, Atoms, Byte, InternParams, lower_ascii_with_params, Mime, Parse, Parser, ParseError, ParamSource, range, Source, }; // From [RFC6838](http://tools.ietf.org/html/rfc6838#section-4.2): // // > All registered media types MUST be assigned ...
the_stack
use num::ToPrimitive; use zksync_crypto::franklin_crypto::{ bellman::pairing::{ bn256::{Bn256, Fr}, ff::{Field, PrimeField}, }, rescue::RescueEngine, }; // Workspace deps use zksync_crypto::{ circuit::{ account::CircuitAccountTree, utils::{append_be_fixed_width, eth_addr...
the_stack
//! Rust wrapper around [bgfx]. //! //! Before using this crate, ensure that you fullfill the build requirements for bgfx, as outlined //! in its [documentation][bgfx building]. If you are compiling for an `msvc` target, make sure to //! build this crate in a developer command prompt. //! //! ## Limitations //! //! - S...
the_stack
use crate::difference_encoding::{DifferenceDecoder, DifferenceEncoder}; use crate::encoding::SparseEncoding; use crate::normal::NormalRepresentation; use crate::state::State; use crate::Result; use crate::ZetaError; use std::cmp::min; use std::collections::BTreeSet; #[derive(Debug, Clone)] pub struct SparseRepresentat...
the_stack
use std::collections::HashMap; use std::fs::File; use std::io::Write; use std::process::Command; use std::sync::atomic::AtomicBool; use std::sync::atomic::AtomicU32; use std::sync::atomic::Ordering; use std::sync::Arc; #[cfg(feature = "deadlock_detection")] use std::thread; #[cfg(feature = "deadlock_detection")] use st...
the_stack
use chrono::offset::Utc; use futures::{ future, sync::{mpsc, oneshot}, Async, Future, Poll, Stream, }; use rand::{thread_rng, Rng}; use sha2::{Digest, Sha256}; use std::collections::HashMap; use std::sync::Arc; use std::time::{Duration, Instant, SystemTime}; use tokio::{ executor::{spawn, DefaultExecuto...
the_stack
use futures::channel::mpsc as async_mpsc; use gettextrs::gettext; use gst::{prelude::*, ClockTime}; use log::{debug, error, info, warn}; use std::{ path::Path, sync::{Arc, Mutex}, }; use metadata::Format; use super::{MediaEvent, Timestamp}; pub struct SplitterPipeline { pipeline: gst::Pipeline, f...
the_stack
use super::{Config, Region, Result}; use semver::Version; use shipcat_definitions::Environment; /// This file contains the `shipcat get` subcommand use std::collections::BTreeMap; // ---------------------------------------------------------------------------- // Simple reducers /// Find the hardcoded versions of serv...
the_stack
use super::property_action::*; use super::super::gtk_action::*; use flo_ui::*; use std::sync::*; pub type PropertyWidgetAction = PropertyAction<GtkWidgetAction>; /// /// Trait implemented by things that can be converted to GTK widget actions /// pub trait ToGtkActions { /// /// Converts this itme to a set o...
the_stack
extern crate cgmath; #[macro_use] extern crate glium; extern crate image; extern crate libc; #[macro_use] extern crate log; extern crate mint; pub mod config; mod mesh; use config::Config; use libc::c_char; use std::error::Error; use std::ffi::CStr; use std::fs::File; use std::{io, panic, slice, thread, time}; //use ...
the_stack
use crate::{ object::{ internal_methods::{InternalObjectMethods, ORDINARY_INTERNAL_METHODS}, JsObject, }, Context, JsResult, JsValue, }; #[cfg(not(feature = "vm"))] use crate::{ builtins::function::{ arguments::Arguments, Captures, ClosureFunctionSignature, Function, NativeFunct...
the_stack
use crate::actions::{experiments::ExperimentError, Action, ActionsCtx}; use crate::db::QueryUtils; use crate::experiments::{Assignee, CapLints, CrateSelect, Experiment, Mode, Status}; use crate::prelude::*; use crate::toolchain::Toolchain; pub struct EditExperiment { pub name: String, pub toolchains: [Option<T...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![rustfmt::skip] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allo...
the_stack
//! Functions that can be called by graph DSL files use std::collections::HashMap; use crate::execution::ExecutionError; use crate::graph::Graph; use crate::graph::Value; use crate::Context; use crate::DisplayWithContext; use crate::Identifier; /// The implementation of a function that can be called from the graph D...
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::gles2::gles2_bindings::types::*; use crate::gles2::{ gles2_bindings, ActiveUniformInfo, BufferId, FramebufferId, ProgramId, RenderbufferId, ShaderId, TextureId, WindowHash, NONE_BUFFER, NONE_FRAMEBUFFER, NONE_PROGRAM, NONE_RENDERBUFFER, NONE_TEXTURE, }; use crate::{RafxError, RafxResult}; use fnv...
the_stack
use super::{ story_action::{StoryActionList, StoryVisitDefinition}, story_state::StoryState, story_trigger::StoryChoice, }; use crate::{ civilization::CivilizationPerk, specification_types::{PAIR_OF_LV0, SINGLE_ONE_HP_HURRIED}, story::story_action::StoryAction, }; use crate::{const_list::ConstLi...
the_stack
use crate::unicode::EcmaVersion; struct EcmaRegexValidator { ecma_version: EcmaVersion, } impl EcmaRegexValidator { pub fn new(ecma_version: EcmaVersion) -> Self { Self { ecma_version } } pub fn validate_pattern(&self, pattern: &str, u_flag: bool) -> Result<(), String> { let mut pat = String::from("/"); pa...
the_stack
use crate::server::Events; use log::{error, trace}; use serde::{Deserialize, Serialize}; use std::borrow::Cow; use std::collections::BTreeMap; use tokio::io::AsyncBufReadExt; use tokio::sync::RwLock; const TWO_HOURS: std::time::Duration = std::time::Duration::from_secs(3600 * 2); #[derive(Deserialize, Clone, PartialE...
the_stack
//! HTML canvas-based console implementation. //! //! TODO(jmmv): There is a lot of duplication between this module and the SDL console //! implementation. While the specifics to render are different, the logic to implement a //! framebuffer-based console is the same -- so we should make it so to minimize bugs here //...
the_stack
extern crate js_sys; extern crate wasm_bindgen; extern crate web_sys; use js_sys::Math; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; use web_sys::{CanvasRenderingContext2d, FocusEvent, HtmlCanvasElement, KeyboardEvent}; use std::cell::RefCell; use std::rc::Rc; #[wasm_bindgen] extern "C" { #[wasm_bindg...
the_stack
use std::mem::transmute; use pleco::{Player, File, SQ, BitBoard, Board, PieceType, Rank, Piece}; use pleco::core::masks::{PLAYER_CNT,RANK_CNT}; use pleco::core::score::*; use pleco::core::mono_traits::*; use pleco::board::castle_rights::Castling; use pleco::core::CastleType; use pleco::helper::prelude::*; use pleco::t...
the_stack
use core::ops::{Deref, DerefMut}; use core::{mem, ptr}; use spin::Mutex; use x86::msr; use crate::memory::Frame; use self::entry::EntryFlags; use self::mapper::{Mapper, PageFlushAll}; use self::table::{Level4, Table}; pub use rmm::{ Arch as RmmArch, PageFlags, PhysicalAddress, TableKind, VirtualA...
the_stack
extern crate indexmap; extern crate byteorder; extern crate env_logger; use std::env; use elfkit::{Elf, Header, types, symbol, relocation, section, Error, loader, dynamic}; use elfkit::symbolic_linker::{SymbolicLinker}; use self::indexmap::{IndexMap}; use std::collections::hash_map::{self,HashMap}; use std::fs::OpenOp...
the_stack
use std::io; use ext_slice::ByteSlice; use ext_vec::ByteVec; /// An extention trait for /// [`std::io::BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html) /// which provides convenience APIs for dealing with byte strings. pub trait BufReadExt: io::BufRead { /// Returns an iterator over the lines of thi...
the_stack