text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
//! Event manager — shell API use log::*; use smallvec::SmallVec; use std::time::{Duration, Instant}; use super::*; use crate::cast::traits::*; use crate::geom::{Coord, DVec2}; use crate::{ShellWindow, TkAction, Widget, WidgetId}; // TODO: this should be configurable or derived from the system const DOUBLE_CLICK_TIM...
the_stack
//! Intrusive red-black tree. use core::borrow::Borrow; use core::cell::Cell; use core::cmp::Ordering; use core::fmt; use core::mem; use core::ptr::NonNull; use crate::Bound::{self, Excluded, Included, Unbounded}; use crate::link_ops::{self, DefaultLinkOps}; use crate::linked_list::LinkedListOps; use crate::pointer_...
the_stack
use kernel::prelude::*; use interface::Interface; use kernel::lib::mem::aref::{Aref,ArefBorrow}; use core::sync::atomic::{AtomicUsize,AtomicU16,Ordering}; pub struct Queue { idx: usize, size: usize, buffer: ::kernel::memory::virt::AllocHandle, descriptors_lock: ::kernel::sync::Mutex<()>, avail_ring_lock: ::kernel...
the_stack
use std::{ collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}, pin::Pin, sync::{Arc, Weak}, task::{Context, Poll, Waker}, }; use futures::future::BoxFuture; use futures::stream::{BoxStream, Stream, StreamExt}; use futures::FutureExt; use parking_lot::RwLock; use pin_project::pin_project; use...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_cas...
the_stack
extern crate serde_derive; #[macro_use] extern crate anyhow; #[macro_use] extern crate pest_derive; use crate::dots::{Dot, DotVar}; use crate::gpg::Gpg; use crate::hook::Hook; use crate::settings::{Profile, Settings}; use crate::state::BombadilState; use crate::templating::Variables; use anyhow::Result; use colored::*...
the_stack
use super::{El, IntoNodes, Mailbox, Node, Text}; use crate::app::App; use crate::browser::dom::virtual_dom_bridge; use web_sys::Document; mod patch_gen; use patch_gen::{PatchCommand, PatchGen}; // We assume that when we run this, the new vdom doesn't have assigned `web_sys::Node`s - // assign them here when we create...
the_stack
use super::*; decl!(u64x8: u64 => (__m256i, __m256i)); impl<S: Simd> Default for u64x8<S> { #[inline(always)] fn default() -> Self { Self::new(unsafe { (_mm256_setzero_si256(), _mm256_setzero_si256()) }) } } impl SimdVectorBase<AVX2> for u64x8<AVX2> { type Element = u64; #[inline(always)]...
the_stack
use failure; use gl; use nalgebra as na; use crate::render_gl::{self, buffer, data}; use crate::resources::Resources; #[derive(VertexAttribPointers, Copy, Clone, Debug)] #[repr(C, packed)] struct Vertex { #[location = "0"] pos: data::f32_f32_f32, #[location = "1"] uv: data::f16_f16, #[...
the_stack
// All io tests that deal with shutdown is currently ignored because there are known bugs in with // shutting down the io driver while concurrently registering new resources. See // https://github.com/tokio-rs/tokio/pull/3569#pullrequestreview-612703467 fo more details. // // When this has been fixed we want to re-enab...
the_stack
extern crate mockers; use mockers::matchers::*; use mockers::Scenario; use mockers_derive::mocked; #[mocked] pub trait A { fn bar(&self, arg: u32); fn noarg(&self); fn num(&self, arg: u32); fn cmplx(&self, maybe: Option<u32>); } #[test] fn test_any_match() { let scenario = Scenario::new(); le...
the_stack
use std::cmp::{min, max}; use font_types::{FontUnit, Direction, VariantGlyph, Glyph, GlyphPart, GlyphInstruction}; use stix::variants::VERT_VARIANTS; use stix::variants::HORZ_VARIANTS; use stix::constants::MIN_CONNECTOR_OVERLAP; use stix::glyph_metrics; //const GLYPH_LIMIT: u16 = 250; pub trait Variant { fn succ...
the_stack
//! Translates and validates specification language fragments as they are output from the Move //! compiler's expansion phase and adds them to the environment (which was initialized from the //! byte code). This includes identifying the Move sub-language supported by the specification //! system, as well as type checki...
the_stack
//! Adapters for various formats for UUIDs use crate::prelude::*; use crate::std::{fmt, str}; #[cfg(feature = "serde")] pub mod compact; /// An adaptor for formatting an [`Uuid`] as a hyphenated string. /// /// Takes an owned instance of the [`Uuid`]. /// /// [`Uuid`]: ../struct.Uuid.html #[derive(Clone...
the_stack
mod kubeconfig; use crate::k8s_types::K8sType; use std::collections::HashMap; use std::io; use std::{ path::{Path, PathBuf}, time::Duration, }; /// Default label that's added to all child resources, so that roperator can track the ownership of resources. /// The value is the `metadata.uid` of the parent. pub...
the_stack
//! Runs hardware devices in child processes. use std::ffi::CString; use std::time::Duration; use base::{error, AsRawDescriptor, RawDescriptor, Tube, TubeError}; use libc::{self, pid_t}; use minijail::{self, Minijail}; use remain::sorted; use serde::{Deserialize, Serialize}; use thiserror::Error; use crate::bus::Con...
the_stack
use actix_web::{post, web, App, HttpResponse, HttpServer, Responder}; use akri_shared::akri::configuration::Configuration; use clap::Arg; use k8s_openapi::apimachinery::pkg::runtime::RawExtension; use openapi::models::{ V1AdmissionRequest as AdmissionRequest, V1AdmissionResponse as AdmissionResponse, V1Admissio...
the_stack
// Copyright (c) 2021 The orion Developers // 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, pub...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_cas...
the_stack
mod os_related; mod tests { use predicates::prelude::*; use std::path::Path; // Used for writing assertions fn tedge_command<I, S>(args: I) -> Result<assert_cmd::Command, Box<dyn std::error::Error>> where I: IntoIterator<Item = S>, S: AsRef<std::ffi::OsStr>, { let path: &st...
the_stack
use itertools::Itertools; use super::action::{Action, VisResult}; use super::PostOrder; use crate::errors::CalyxResult; use crate::ir::{self, Component, Context, Control, LibrarySignatures}; use std::rc::Rc; /// Trait that describes named things. Calling [`do_pass`](Visitor::do_pass) and [`do_pass_default`](Visitor::...
the_stack
use crate::address::{Address, AddressRegion, AddressSize}; use crate::environment::{FuncIndex, FunctionStore}; use crate::frame::Frame; use crate::instruction::DfgInstructionContext; use crate::state::{MemoryError, State}; use crate::step::{step, ControlFlow, StepError}; use crate::value::ValueError; use cranelift_code...
the_stack
use core::{marker::PhantomData, mem::MaybeUninit, ptr::addr_of_mut}; use r3::{ kernel::{cfg::CfgBuilder, StartupHook, Task}, prelude::*, }; use r3_portkit::pptext::pp_asm; use r3_test_suite::kernel_tests::Driver; pub struct App<System> { _phantom: PhantomData<System>, } impl<System: Kernel> App<System> { ...
the_stack
use std::convert::Infallible; use std::fmt; use std::num::NonZeroUsize; use std::pin::Pin; use std::task::Poll; use heph::actor_ref::{ActorRef, Join, RpcError, RpcMessage, SendError, SendValue}; use heph::rt::{Runtime, ThreadLocal}; use heph::spawn::options::Priority; use heph::supervisor::NoSupervisor; use heph::test...
the_stack
use serde_json::Value; use std::fs::read_to_string; use std::path::Path; use std::io::{Write}; fn main() { let commands: Vec<&str> = vec![ "install", "uninstall", "update", "bundle", "search", "new", "config", "sign", "show", "find", ...
the_stack
use crate::{Entity, Event, FontOrId, Propagation, State, Tree, TreeExt, Display, Visibility, WindowEvent}; use femtovg::{ renderer::OpenGl, Canvas, }; /// Dispatches events to widgets. /// /// The [EventManager] is responsible for taking the events in the event queue in state /// and dispatching them to widget...
the_stack
use std::convert::TryFrom; use std::fmt; use pathfinder_geometry::line_segment::LineSegment2F; use pathfinder_geometry::rect::RectI; use pathfinder_geometry::vector::{vec2f, vec2i, Vector2I}; use crate::binary::read::ReadScope; use crate::binary::{I16Be, U8}; use crate::cff::outline::argstack::ArgumentsStack; use cra...
the_stack
use rustc::hir; use rustc::hir::map as hir_map; use rustc::hir::def_id::DefId; use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::mir::{self, Location}; use rustc::mir::visit as mir_visit; use rustc::mir::visit::Visitor as MirVisitor; use rustc::traits; use rustc::ty::subst::Substs; use rustc::ty::{self, Ty, Ty...
the_stack
//! The vector scene to be rendered. use crate::builder::SceneBuilder; use crate::concurrent::executor::Executor; use crate::gpu::options::RendererLevel; use crate::gpu::renderer::Renderer; use crate::gpu_data::RenderCommand; use crate::options::{BuildOptions, PreparedBuildOptions}; use crate::options::{PreparedRender...
the_stack
use crate::prelude::*; use nu_engine::WholeStreamCommand; use nu_errors::ShellError; use nu_protocol::{ ColumnPath, Primitive, ReturnSuccess, ShellTypeName, Signature, SyntaxShape, UntaggedValue, Value, }; use nu_source::{Tag, Tagged}; use nu_value_ext::ValueExt; use chrono::{DateTime, FixedOffset, Local, Loca...
the_stack
use crate::address::ZcashAddress; use crate::derivation_path::ZcashDerivationPath; use crate::extended_public_key::ZcashExtendedPublicKey; use crate::format::ZcashFormat; use crate::librustzcash::zip32::ExtendedSpendingKey; use crate::network::ZcashNetwork; use crate::private_key::{SaplingSpendingKey, ZcashPrivateKey};...
the_stack
use color::{Color, Gradient}; use element::{self, Element, new_element}; use graphics::{self, Context, Graphics, Transformed}; use graphics::character::CharacterCache; use std::f64::consts::PI; use std::path::PathBuf; use text::Text; use transform_2d::{self, Transform2D}; /// A general, freeform 2D graphics structure...
the_stack
use crate::core::bits::Bits; use crate::core::condition::Condition; use crate::core::exception::{Exception, ExceptionHandling}; use crate::core::fault::Fault; use crate::core::instruction::{Imm32Carry, Instruction, SetFlags}; use crate::core::operation::condition_test; use crate::core::register::{Apsr, BaseReg}; use c...
the_stack
use ctypes::{c_double, c_float, c_int, c_uint, c_void}; use shared::basetsd::{LONG64, ULONG64}; use shared::minwindef::{BYTE, DWORD, FLOAT, UINT, ULONG, USHORT, WORD}; use shared::wtypes::{BSTR, DATE, DECIMAL, LPBSTR, LPDECIMAL, VARTYPE}; use shared::wtypesbase::{DOUBLE, LPCOLESTR, LPOLESTR, OLECHAR}; use um::minwinbas...
the_stack
use std::error::Error as StdError; use std::hash::{Hash, Hasher}; use std::{fmt, i64, mem}; use num_traits::cast; use rustc_hash::FxHashMap; use gc_arena::{Collect, GcCell, MutationContext}; use crate::Value; #[derive(Debug, Copy, Clone, Collect)] #[collect(no_drop)] pub struct Table<'gc>(pub GcCell<'gc, TableState...
the_stack
use super::{ on_create_task_common, session_common::kill_all_tasks_common, task::{replay_task::ReplayTask, TaskSharedPtr, TaskSharedWeakPtr}, }; use crate::{ arch::Architecture, auto_remote_syscalls::AutoRemoteSyscalls, bindings::ptrace::PTRACE_EVENT_EXIT, emu_fs::{EmuFs, EmuFsSharedPtr}, ...
the_stack
use crate::{chars_to_code_point_ranges, pack_adjacent_chars, parse_line}; use std::collections::HashMap; use std::fs::File; use std::io::{self, BufRead}; use codegen::{Block, Enum, Function, Scope}; pub(crate) fn generate(scope: &mut Scope) { let mut property_enum = Enum::new("UnicodePropertyValueGeneralCategory"...
the_stack
use tink_proto::{ AesGcmKeyFormat, EcPointFormat, EciesAeadDemParams, EciesAeadHkdfKeyFormat, EciesAeadHkdfParams, EciesAeadHkdfPrivateKey, EciesAeadHkdfPublicKey, EciesHkdfKemParams, EllipticCurveType, HashType, KeyTemplate, OutputPrefixType, }; #[test] fn test_private_key_manager_params() { tink_hybr...
the_stack
use crate::{Button, IconName}; use std::borrow::Cow; use std::cell::RefCell; use std::fmt; use std::rc::Rc; use std::time::Duration; use yew::prelude::*; use yew::services::timeout::{TimeoutService, TimeoutTask}; pub struct PanelBuilder<F: Fn(Option<Html>, I) -> O, I, O> { title: Option<Html>, input: I, fi...
the_stack
use std::collections::HashMap; use std::fmt; use failure::{format_err, ResultExt}; use xcb_util::keysyms::KeySymbols; use xcb_util::{ewmh, icccm}; use crate::groups::Group; use crate::keys::{KeyCombo, KeyHandlers}; use crate::stack::Stack; use crate::Result; pub use self::ewmh::StrutPartial; /// A handle to an X Wi...
the_stack
use async_trait::async_trait; use interledger_errors::{AccountStoreError, AddressStoreError}; use interledger_packet::{Address, Fulfill, Prepare, Reject}; use std::{ fmt::{self, Debug}, future::Future, marker::PhantomData, sync::Arc, }; use uuid::Uuid; mod username; pub use username::Username; #[cfg(fe...
the_stack
#![deny(missing_docs)] mod apiserver; mod config; mod container; mod controllermanager; mod coredns; mod crio; mod encryptionconfig; mod etcd; mod kubeconfig; mod kubectl; mod kubelet; mod logger; mod network; mod nix; mod node; mod pki; mod podman; mod process; mod progress; mod proxy; mod scheduler; mod system; pub...
the_stack
use std::collections::HashMap; use std::hash::{Hash, Hasher}; use std::io::Error; use std::rc::Rc; use crate::rules::{BonusList, StatList}; use sulis_core::image::Image; use sulis_core::resource::ResourceSet; use sulis_core::util::unable_to_create_error; use crate::{Actor, Module, PrereqList, PrereqListBuilder}; #[d...
the_stack
use memory::virt::ProtectionMode; use arch::memory::PAddr; use arch::memory::{PAGE_SIZE, PAGE_MASK}; use arch::memory::virt::TempHandle; use core::sync::atomic::{Ordering,AtomicU32}; extern "C" { static kernel_table0: [AtomicU32; 0x800*2]; static kernel_exception_map: [AtomicU32; 1024]; } const KERNEL_TEMP_BASE : u...
the_stack
use super::environment::Environment; use super::environment::jni::{JNI, JNIEnvironment}; use super::environment::jvmti::{JVMTI, JVMTIEnvironment}; use super::error::{translate_error, NativeError}; use super::event::*; use super::method::MethodId; use super::native::*; use super::native::jvmti_native::*; use super::runt...
the_stack
use num_bigint::BigUint; use sp_ipld::Ipld; use sp_std::{ borrow::ToOwned, fmt, vec::Vec, }; use alloc::string::String; use crate::{ defs, ipld_error::IpldError, literal::Literal, parse, prim::bits, term::Term, yatima, }; use core::convert::TryFrom; /// Primitive byte operations #[derive(Partial...
the_stack
extern crate failure; extern crate indexmap; extern crate rusqlite; extern crate edn; extern crate mentat_core; extern crate db_traits; #[macro_use] extern crate core_traits; extern crate mentat_db; // For value conversion. extern crate mentat_query_algebrizer; extern crate mentat_query_pull; extern c...
the_stack
use crate::lowlevel::{BuiService, EventChunkSender}; use bui_backend_types::{ConnectionKey, SessionKey}; use {futures, hyper, serde, serde_json, std}; use async_change_tracker::ChangeTracker; use std::collections::HashMap; use std::sync::Arc; use futures::{channel::mpsc, future::FutureExt, sink::SinkExt, stream::St...
the_stack
use euclid::Angle; use lyon_geom::{ ArcFlags, CubicBezierSegment, Line, LineSegment, Point, Scalar, SvgArc, Transform, Vector, }; pub enum ArcOrLineSegment<S> { Arc(SvgArc<S>), Line(LineSegment<S>), } fn arc_from_endpoints_and_tangents<S: Scalar>( from: Point<S>, from_tangent: Vector<S>, to: P...
the_stack
use std::collections::HashSet; use std::pin::Pin; use futures::future; use futures::Future; use crate::bsdf::*; use crate::shape::*; use crate::*; pub mod bvh { use std::sync::Mutex; use ordered_float::OrderedFloat; use super::*; #[derive(Clone, Copy, Debug)] pub struct BVHNode { pub ax...
the_stack
use std::collections::HashMap; use std::hash::Hash; use std::marker::PhantomData; use crate::contract::address::Addresser; use crate::contract::context::error::ContractContextError; use crate::handler::TransactionContext; use crate::protocol::key_value_state::{ StateEntry, StateEntryBuilder, StateEntryList, StateE...
the_stack
use std::collections::BTreeMap; use std::sync::Arc; use anyhow::Result; use crate::query::{DocumentId, Occur, QueryData, QuerySelector}; use crate::reader::{QueryPayload, QueryResults}; use crate::structures::{ DocumentHit, DocumentOptions, DocumentValueOptions, IndexContext, }; use crate::writer::Wri...
the_stack
use core::cmp; use core::marker::PhantomData; use core::mem::{align_of, size_of}; use core::ops::{Deref, DerefMut}; use core::ptr::{write, NonNull}; use core::slice; use crate::kernel::Kernel; use crate::process::{Error, Process, ProcessCustomGrantIdentifer, ProcessId}; use crate::upcall::{Upcall, UpcallError, UpcallI...
the_stack
use core::{fmt, str::FromStr}; use nom::{ branch::alt, bytes::complete::tag, character::complete::{char, digit1, space0, space1}, combinator::{map, map_res, opt}, multi::separated_list, sequence::delimited, IResult, }; use crate::ir::FnSig; // NOTE we don't keep track of pointers; `i8` an...
the_stack
#[derive(Copy, Clone, Debug)] pub enum KeyboardKey { /// The '1' key over the letters. Key1, /// The '2' key over the letters. Key2, /// The '3' key over the letters. Key3, /// The '4' key over the letters. Key4, /// The '5' key over the letters. Key5, /// The '6' key over th...
the_stack
use std::cmp::PartialEq; use std::collections::BTreeMap; use std::env; use std::io::Write; use std::process; use crate::errors::{ErrorKind, Result}; const PREFIX_CHARS_SHORT: &str = "-"; const PREFIX_CHARS_LONG: &str = "-"; const ARG_SEPARATOR: &str = "--"; const HELP_SHORT: &str = "h"; const HELP_LONG: &str = "help"...
the_stack
use super::Dependency; use fantoch::id::ProcessId; use fantoch::{HashMap, HashSet}; #[derive(Debug, Clone, PartialEq, Eq)] pub struct QuorumDeps { // fast quorum size fast_quorum_size: usize, // set of processes that have participated in this computation participants: HashSet<ProcessId>, // mapping...
the_stack
mod tests { use atomic::Ordering; use crate::util::constants; use crate::util::heap::layout::vm_layout_constants; use crate::util::metadata::side_metadata::SideMetadataContext; use crate::util::metadata::side_metadata::SideMetadataSpec; use crate::util::metadata::side_metadata::*; use crate...
the_stack
#[macro_use] extern crate serde_json; // ------------------------------------------ // hyperledger crates // ------------------------------------------ extern crate indyrs as indy; // rust wrapper project use std::env; use std::fs; use std::io::Write; use std::path::PathBuf; use indy::did; use ...
the_stack
use std::cmp::{min, max}; use std::num::Wrapping; const INTEGERS_POWER_OF_TEN : [u64; 19] = [ 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 10000000000...
the_stack
pub use crate::board::*; pub use crate::board::{PieceColor::*, PieceKind::*}; pub use crate::engine::*; pub use crate::move_generation::*; pub use crate::time_control::*; pub use crate::utils::*; use crate::zobrist::ZobristHasher; use log::{error, info}; use std::io::{self, BufRead}; use std::process; use std::sync::mp...
the_stack
use super::ast::*; use super::expr::{binary_expression, expression}; use super::identifier::identifier; use super::literal::{boolean_literal, null_literal}; use super::variable::variable_declaration; named!( break_statement<Statement>, map!(tag!("berhenti;"), |_| Statement::Break) ); named!( continue_stat...
the_stack
pub mod error; mod pending; pub mod runner; pub mod task; use std::{future::Future, pin::Pin, time::Duration}; use futures::{ stream::{FuturesOrdered, FuturesUnordered}, StreamExt, }; use tokio::time::timeout; pub use self::error::{Error, Result}; use self::{ pending::PendingWorkerTasks, runner::{ ...
the_stack
extern crate amcl; use std::io; use std::str; use amcl::rand::RAND; use amcl::types::CurveType; pub fn printbinary(array: &[u8]) { for i in 0..array.len() { print!("{:02X}", array[i]) } println!("") } fn ecdh_ed25519(mut rng: &mut RAND) { //use amcl::ed25519; use amcl::ed25519::ecdh; ...
the_stack
use core::mem::{transmute_copy, ManuallyDrop}; /// Marker trait for types that can be represented as an unsigned integer. /// /// A type that implements this trait is assumed to have the exact same memory /// layout and representation as an unsigned integer, with the current compile /// target's endianness. This impli...
the_stack
pub(crate) mod perf_map_poller; use std::{ fmt::{Debug, Display, Formatter}, iter::FusedIterator, os::{ raw::{c_long, c_uchar, c_uint, c_ulong, c_ushort}, unix::io::RawFd, }, ptr::null_mut, slice, sync::atomic::{self, AtomicPtr, Ordering}, }; use crate::{ bpf::{ ...
the_stack
use crate::auth::auth_v2::AuthContextV2; use crate::auth::{AuthContext, Permission}; use crate::config::convert::rule_into_dto; use crate::error::ApiError; use log::*; use std::sync::Arc; use tornado_engine_api_dto::common::Id; use tornado_engine_api_dto::config::{ ProcessingTreeNodeConfigDto, ProcessingTreeNodeDet...
the_stack
use serde::Deserialize; use std::convert::TryFrom; // typedef for typedef openconfig-types:std-regexp. type StdRegexp = String; // typedef for typedef openconfig-types:percentage. type Percentage = u8; // typedef for typedef bgp-types:rr-cluster-id-type. type RrClusterIdType = String; // typedef for identity bgp-types...
the_stack
use self::normal::{BodyProof, VssCertificates}; use self::sign::{BlockSignature, MainToSign}; use self::update; use address; use block::*; use cbor_event::{self, se}; use coin; use config::ProtocolMagic; use fee; use hash; use hdwallet::Signature; use std::{ collections::{BTreeSet, HashSet}, error, fmt, }; use ...
the_stack
use wasm_bindgen::prelude::*; use super::common::*; use super::quaternion::*; use super::quaternion2::*; use super::vector3::*; #[wasm_bindgen] pub struct Matrix4( pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32...
the_stack
use std::cmp; use std::time::{ Duration, Instant }; #[cfg(not(feature="tracing"))] use log as log; #[cfg(feature="tracing")] use tracing as log; use parking_lot::{ RwLock, RwLockUpgradableReadGuard }; use reqwest::{ StatusCode, Response }; use scan_fmt::scan_fmt; use tokio::sync::Notify; use crate::RiotApiConfig; us...
the_stack
use crate::cir::*; use crate::compile_ir::{get_index, pos_to_func_idx, func_idx_to_pos, OBJECTIVE}; use crate::Datapack; use std::collections::HashMap; use std::str::FromStr; use std::convert::TryFrom; // FIXME: Multiple conditions and a `store success` does not work like I think it does!!! #[derive(Debug, Clone, Par...
the_stack
use crate::sync::linked_list::{LinkedList, Node}; use core::{ cell::UnsafeCell, fmt, future::Future, mem::MaybeUninit, ops::{Deref, DerefMut}, pin::Pin, sync::atomic::{AtomicU8, Ordering}, task::{Context, Poll, Waker}, }; /// A mutual exclusion primitive useful for protecting shared dat...
the_stack
use crate::{ border::BorderBuilder, brush::Brush, core::{color::Color, pool::Handle}, decorator::Decorator, draw::{CommandTexture, Draw, DrawingContext}, message::{ DecoratorMessage, ListViewMessage, MessageDirection, UiMessage, UiMessageData, WidgetMessage, }, scroll_vie...
the_stack
//! Implementation of an in-memory repository. use std::{ borrow::Cow, collections::{hash_map::DefaultHasher, BTreeMap, VecDeque}, hash::Hasher, mem::size_of, sync::{atomic::Ordering, Arc}, thread::JoinHandle, }; #[cfg(test)] use crate::serialize::persistent::AbsoluteOffset; use crossbeam_cha...
the_stack
use anyhow::{Context, Result}; use assert_cmd::prelude::*; use predicates::prelude::*; use predicates::str::is_match; use std::process::Command; mod support; fn cargo_wasi(args: &str) -> Command { let mut me = std::env::current_exe().unwrap(); me.pop(); me.pop(); me.push("cargo-wasi"); me.set_exte...
the_stack
use crate::types::Role; use crate::Client; use grammers_mtproto::mtp::RpcError; use grammers_mtsender::InvocationError; use grammers_session::PackedChat; use grammers_tl_types as tl; use pin_project_lite::pin_project; use std::{ future::Future, marker::PhantomPinned, mem::drop, pin::Pin, task::{Cont...
the_stack
use std::future::Future; use std::io; use std::io::{Read, Seek, SeekFrom, Write}; use std::net::TcpStream; use std::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6, UdpSocket}; use std::net::{SocketAddr, ToSocketAddrs}; use std::os::unix::net::{SocketAddr as UnixSocketAddr, UnixStream}; use std::path::Path; use st...
the_stack
use crate::util::{Mutex, RwLock}; use std::fmt; use std::fs::File; use std::net::{Shutdown, TcpStream}; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use lru_cache::LruCache; use crate::chain; use crate::chain::txhashset::BitmapChunk; use crate::conn; use crate::core::core...
the_stack
use crate::common::Rect; use crate::components::draw_common::{draw_number, Alignment}; use crate::entity::GameEntity; use crate::frame::Frame; use crate::framework::context::Context; use crate::framework::error::GameResult; use crate::framework::graphics::screen_insets_scaled; use crate::inventory::Inventory; use crate...
the_stack
use std::{collections::HashSet, sync::Arc}; use chrono::{DateTime, Duration, Utc}; use der_parser::oid::Oid; use lazy_static::lazy_static; use ra_common::{ AttestationReport, AttestationReportBody, EnclaveQuoteStatus, Quote, OID_EXTENSION_ATTESTATION_REPORT, }; use rustls::{ internal::pemfile::certs, Certi...
the_stack
use super::{ pipe_exec::create_pipe, sys::NULL_PATH, variables::Value, IonError, PipelineError, Shell, }; use crate::{ expansion::{Error, Expander, Result, Select}, types, }; use nix::unistd::{tcsetpgrp, Pid}; #[cfg(target_os = "redox")] use redox_users::All; use std::{env, fs::File, io::Read}; #[cfg(not(ta...
the_stack
use crate::{counters::*, data_cache::StateViewCache}; use anyhow::Result; use aptos_state_view::StateView; use aptos_types::{ transaction::{SignatureCheckedTransaction, SignedTransaction, VMValidatorResult}, vm_status::{StatusCode, VMStatus}, }; use crate::{ data_cache::AsMoveResolver, logging::Adapter...
the_stack
use crate::pubsub::publish; use eyre::Result; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::path::Path; use strum::{EnumString, EnumVariantNames, ToString}; use tracing::Event; use validator::Validate; /// Logging level #[derive( Debug, Clone, Copy, PartialEq, PartialOrd, ...
the_stack
use crate::inventory::{Inventory, InventoryType, Item, Slot}; use crate::render::hud::{Hud, HudContext}; use crate::render::inventory::InventoryWindow; use crate::render::Renderer; use crate::ui; use crate::ui::{Container, HAttach, VAttach}; use std::sync::Arc; use leafish_protocol::protocol::Version; use parking_lot:...
the_stack
//! Widget traits use std::fmt; use crate::event::{Event, EventMgr, Response, Scroll, SetRectMgr}; use crate::geom::{Coord, Offset, Rect}; use crate::layout::{AlignHints, AxisInfo, SizeRules}; use crate::theme::{DrawMgr, SizeMgr}; use crate::util::IdentifyWidget; use crate::WidgetId; use kas_macros::autoimpl; #[allo...
the_stack
use std::fmt; use std::path::{Path, PathBuf, Component}; use serde::de::{self, Unexpected, Deserializer}; /// A helper function to determine the relative path to `path` from `base`. /// /// Returns `None` if there is no relative path from `base` to `path`, that is, /// `base` and `path` do not share a common ancestor...
the_stack
extern crate http; extern crate iron; extern crate matrix_rocketchat; extern crate matrix_rocketchat_test; extern crate reqwest; extern crate router; extern crate ruma_client_api; extern crate ruma_identifiers; extern crate serde_json; use std::collections::HashMap; use std::convert::TryFrom; use std::sync::{Arc, Mute...
the_stack
use serde_json::Value as Json; use search::{Term, Token, Query, TermScorer}; use search::schema::Schema; use mapping::FieldSearchOptions; use query_parser::{QueryBuildContext, QueryParseError, QueryBuilder}; use query_parser::utils::{parse_string, parse_float, Operator, parse_operator, parse_field_and_boost}; #[der...
the_stack
use super::*; use crate::{ error::{to_audius_program_error, AudiusProgramError}, processor::SENDER_SEED_PREFIX, state::{SenderAccount, VoteMessage}, }; use borsh::BorshDeserialize; use borsh::BorshSerialize; use solana_program::{ account_info::AccountInfo, entrypoint::ProgramResult, instruction::Instruc...
the_stack
use crate::ciphersuite::Ciphersuite; #[cfg(test)] use crate::test_utils::{read, write}; use crate::{ ciphersuite::signable::Signable, credentials::{CredentialBundle, CredentialType}, node::Node, prelude::KeyPackageBundlePayload, test_utils::hex_to_bytes, }; use crate::{ ciphersuite::Secret, ...
the_stack
//! Crate for displaying simple surfaces and GPU buffers over a low-level display backend such as //! Wayland or X. use std::collections::BTreeMap; use std::io::Error as IoError; use std::path::Path; use std::time::Duration; use base::{AsRawDescriptor, Error as BaseError, EventType, PollToken, RawDescriptor, WaitCont...
the_stack
use crate::{ app::{ LdtkEntity, LdtkEntityMap, LdtkIntCellMap, PhantomLdtkEntity, PhantomLdtkEntityTrait, PhantomLdtkIntCell, PhantomLdtkIntCellTrait, }, assets::{LdtkLevel, TilesetMap}, components::*, ldtk::{ EntityDefinition, EnumTagValue, LayerDefinition, LevelBackgroundPo...
the_stack
use once_cell::sync::OnceCell; use shared_child::SharedChild; use std::collections::HashMap; use std::ffi::{OsStr, OsString}; use std::fmt; use std::fs::File; use std::io; use std::io::prelude::*; use std::mem; use std::path::{Path, PathBuf}; use std::process::{Command, ExitStatus, Output, Stdio}; use std::sync::{Arc, ...
the_stack
use super::code::{Bytecode, Instr, Lambda, ParamMap, Stay, StaySource}; use super::engine::{glsp, Filename, Span, SpanStorage, Sym}; use super::error::GResult; use super::gc::{Header, Root, Slot}; use super::val::Val; use flate2::{ write::{DeflateDecoder, DeflateEncoder}, Compression, }; use fnv::FnvHashMap; us...
the_stack
use std::cmp::{Eq, Ord, Ordering, PartialOrd}; use std::collections::BTreeMap; use std::iter::Iterator; use std::ops::Bound; use std::ops::Range; /// Keys for the map inside RangeMap. /// /// This object holds a Range but implements the ordering traits according to /// the start of the range. Using this struct lets us...
the_stack
#[cfg(feature = "9160")] use crate::pac::{ timer0_ns::{ RegisterBlock as RegBlock0, EVENTS_COMPARE, TASKS_CAPTURE, TASKS_CLEAR, TASKS_COUNT, TASKS_START, TASKS_STOP, }, Interrupt, TIMER0_NS as TIMER0, TIMER1_NS as TIMER1, TIMER2_NS as TIMER2, }; #[cfg(not(feature = "9160"))] use crate::pac:...
the_stack
pub mod opcodes; use crate::events::Event; use crate::joypad::Key; use crate::memory::mmu::{HdmaType, Mmu}; const MAX_CYCLES: usize = 69905; #[derive(Debug, PartialEq, Clone)] pub enum EmulationMode { Dmg, Cgb, } #[derive(Debug, Clone)] pub enum CgbSpeed { Normal, Double, } #[derive(Debug)] pub str...
the_stack
pub mod memory { pub type PAddr = u64; pub type VAddr = usize; pub const PAGE_SIZE: usize = 4096; pub mod addresses { pub fn is_global(_addr: usize) -> bool { false } pub const STACK_SIZE: usize = 5*0x1000; pub const USER_END: usize = 0x8000_0000; pub const STACKS_BASE: usize = 0; pub const STACK...
the_stack
use super::{Attrs, El, ElKey, ElRef, EventHandler, Node, Style, Tag, Text}; // ------ Traits ------ /// `UpdateEl` is used to distinguish arguments in element-creation macros, and handle /// each type appropriately. pub trait UpdateEl<Ms> { fn update_el(self, el: &mut El<Ms>); } /// Similar to `UpdateEl`, specia...
the_stack