text
stringlengths
7.05k
33.9k
use futures::{ Async, AsyncSink, Future, Poll, Sink, Stream }; use futures::future::{ Shared }; use futures::stream::{ SplitSink, SplitStream }; use futures::sync::{ mpsc, oneshot }; use lsp_rs::{ ClientNotification, IncomingMessage, IncomingServerMessage, Me...
// https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h // Part of this same header is in linux_wayland/ffi/input_event_codes.rs pub const KEY_RESERVED: u16 = 0; pub const KEY_ESC: u16 = 1; pub const KEY_1: u16 = 2; pub const KEY_2: u16 = 3; pub const KEY_3: u16 = 4; pub const KEY_4: u...
// // Copyright (c) 2020 <NAME> <<EMAIL>> // // Kip imports use kip::args::{Opt, Subcommands}; use kip::conf::KipConf; use kip::crypto::{argon_hash_secret, compare_argon_secret}; use kip::job::{Job, KipFile}; // External imports use chrono::prelude::*; use colored::*; use dialoguer::Confirm; use dialoguer::Password; u...
use super::*; use super::chunk::*; use super::config; use super::ipc::SHM_MANAGER; use super::process::elf_file::{ElfFile, ProgramHeaderExt}; use super::user_space_vm::USER_SPACE_VM_MANAGER; use super::vm_area::VMArea; use super::vm_perms::VMPerms; use super::vm_util::{VMInitializer, VMMapAddr, VMMapOptions, VMMapOpti...
// Copyright (c) 2018-2021 The MobileCoin Foundation //! MobileCoin Ingest Enclave Implementation //! //! This crate implements the inside-the-enclave version of the //! IngestEnclaveAPI. #![no_std] #![deny(missing_docs)] extern crate alloc; mod identity; pub use identity::RistrettoIdentity; mod rng_store; pub use...
use egg::{rewrite as rw, *}; use ordered_float::NotNan; pub type EGraph = egg::EGraph<Math, ConstantFold>; pub type Rewrite = egg::Rewrite<Math, ConstantFold>; pub type Constant = NotNan<f64>; define_language! { pub enum Math { "d" = Diff([Id; 2]), "i" = Integral([Id; 2]), "+" = Add([Id;...
//TODO: remove this conditional test #[cfg(not(target_os = "macos"))] #[cfg(test)] mod association_test; mod association_internal; mod association_stats; use crate::chunk::chunk_abort::ChunkAbort; use crate::chunk::chunk_cookie_ack::ChunkCookieAck; use crate::chunk::chunk_cookie_echo::ChunkCookieEcho; use crate::chun...
use crate::error::Error; use crate::epoch::Epoch; use crate::instant::Instant; #[cfg(feature = "serde")] use serde::{Serialize, Deserialize}; /// This specifies traditional Calendar settings that use the traditional 12 months /// and have leap years. This is implemented for `Gregorian` and `Julian`. It does /// not ...
// Copyright 2019-2020 Parity Technologies (UK) Ltd. // This file is part of substrate-subxt. // // subxt 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 version 3 of the License, or // (at your optio...
use crate::error::*; use std::path::{Path, PathBuf}; use std::process::Command; /// Signs and verifies Java Archive (JAR) files #[derive(Clone, Default)] pub struct JarSigner { verify: bool, jar_file: PathBuf, alias: String, keystore: Option<PathBuf>, storepass: Option<String>, storetype: Optio...
//! Azul is a free, functional, immediate-mode GUI framework for rapid development //! of desktop applications written in Rust, supported by the Mozilla WebRender //! rendering engine, using a flexbox-based CSS / DOM model for layout and styling. //! //! # Concept //! //! Azul is largely based on the principle of immed...
use crate::pairing::ff::{Field}; use crate::pairing::{Engine, CurveProjective}; use std::marker::PhantomData; use super::{Proof, SxyAdvice}; use super::batch::Batch; use super::poly::{SxEval, SyEval}; use super::parameters::{Parameters, NUM_BLINDINGS}; use crate::SynthesisError; use crate::sonic::transcript::{Transc...
use std::borrow::Cow; use rustc_span::DUMMY_SP; use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc::mir::interpret::{ read_target_uint, AllocId, Allocation, ConstValue, GlobalAlloc, InterpResult, Scalar, }; use rustc::ty::{layout::Align, Const, ConstKind}; use rustc_data_structures::fx::FxHashSet;...
use std::{borrow::Cow, cmp::Ordering, convert::identity, f32::consts::PI, iter}; use rosu_pp::parse::{PathControlPoint, PathType, Pos2}; const BEZIER_TOLERANCE: f32 = 0.25; const CATMULL_DETAIL: usize = 50; const CIRCULAR_ARC_TOLERANCE: f32 = 0.1; #[derive(Default)] pub(crate) struct CurveBuffers { vertices: Vec...
use std::str::FromStr; use argparse::{ArgumentParser, StoreTrue, Store, StoreOption};//,StoreFalse, List}; /* Default injection mode values */ const INJ_DEFAULT_SIZE: usize = 0x1000; const INJ_DEFAULT_EXT: Option<&'static str> = Some(".text"); const INJ_DEFAULT_ENTRY: Option<u64> = None; const INJ_DEFAULT_OFFSET: Opti...
use std::env::{args, Args}; use std::fs::File; use std::io::{BufReader, BufWriter, Read, Seek, Write}; use std::path::Path; use std::result::Result; use diffy::{apply_all_bytes, ApplyOptions, DiffOptions, Patch, PatchFormatter}; use itertools::Itertools; use rayon::prelude::*; use zip::{ZipArchive, ZipWriter}; use se...
//! # SHA256 //! //! Implementation of SHA256 digest according to [RFC 6234][rfc]. //! //! [rfc]: https://tools.ietf.org/html/rfc6234#section-5.1 //! /// Length of digest array pub const DIGEST_SIZE: usize = 32; /// Internal block size pub const BLOCK_SIZE: usize = 64; // See: https://tools.ietf.org/html/rfc6234#sec...
use crate::Document; use crate::Row; use crate::Terminal; use std::env; use std::io::stdout; use std::time::Duration; use std::time::Instant; use termion::color; use termion::event::Key; use termion::raw::IntoRawMode; const VERSION: &str = env!("CARGO_PKG_VERSION"); #[derive(PartialEq, Copy, Clone)] pub enum SearchDi...
//! Intel Attestation Service (IAS) attestation verification report handling. use std::io::{Cursor, Read, Seek, SeekFrom}; use anyhow::{anyhow, Result}; use base64; use byteorder::{LittleEndian, ReadBytesExt}; use chrono::prelude::*; use lazy_static::lazy_static; use oid_registry::{OID_PKCS1_RSAENCRYPTION, OID_PKCS1_S...
// Copyright 2019 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use crate::{ control_request_type, descriptor, ConfigDescriptorTree, ControlRequestDataPhaseTransferDirection, ControlRequestRecipient, Control...
use crate::{base_typedef::*, get_last_error, get_process_handle, Win32Result}; use core::mem::{size_of, zeroed}; macro_rules! user32_fn { ( $(#[$fn_meta:meta])* fn $( $fn_tokens:tt )* ) => { #[link(name = "User32")] extern "system" { $(#[$fn_meta])* fn $( $fn_tokens )*; } }; ( $...
use nalgebra::{ allocator::Allocator, convert, storage::{Owned, Storage}, DefaultAllocator, Dim, Matrix, OMatrix, RealField, SMatrix, SliceStorage, U1, U2, U3, }; #[cfg(feature = "serde-serialize")] use serde::{Deserialize, Serialize}; use crate::{ coordinate_system::CameraFrame, Bundle, Error, In...
use winapi::um::{ winuser::{WS_VISIBLE, WS_DISABLED, SS_WORDELLIPSIS}, wingdi::DeleteObject }; use winapi::shared::windef::HBRUSH; use crate::win32::window_helper as wh; use crate::win32::base_helper::check_hwnd; use crate::{Font, NwgError, HTextAlign, VTextAlign, RawEventHandler, unbind_raw_event_handler}; us...
use std::collections::HashMap; use std::convert::TryFrom; use std::fmt; use std::ops::Deref; use std::pin::Pin; use std::task::Context; use std::task::Poll; use std::time::Instant; use graph::components::server::query::GraphQLServerError; use graph::data::subgraph::schema::{SubgraphEntity, SUBGRAPHS_ID}; use graph::pr...
/* - Let's see if we can implement some custom Errors for bad inputs - - Comes down to implementing a bunch of traits for your error type, but not necessarily required to implement Error trait: see - - https://stackoverflow.com/questions/42584368/how-do-you-define-custom-error-types-in-rust So our problem *appea...
// Copyright (c) 2018 The openrtb-rust authors // // 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 // exc...
use std::collections::HashMap; use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; use std::time::Duration; use crate::channel::named_channel; use crate::channel::sender::ChannelSender; use crate::channel::utils::iter::ChannelIterator; use crate::core::checkpoint::{Checkpoint, Check...
// All of the below is super-alpha so dont use just yet :) use crate::seed_bind::UpdateElLocal; use atomic_hooks::*; use seed::virtual_dom::attrs::Attrs; use seed::{prelude::*, *}; use serde::{de::DeserializeOwned, Serialize}; use serde_json::value::Value; use std::collections::HashMap; use std::marker::PhantomData;...
// Copyright 2020 <NAME> // // 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/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
use crate::cairo::lang::{ compiler::program::Program, instances::CairoLayout, vm::{ builtin_runner::BuiltinRunner, memory_dict::{Error as MemoryDictError, MemoryDict}, memory_segments::{Error as MemorySegmentError, MemorySegmentManager}, relocatable::{MaybeRelocatable, Reloca...
use std::{ convert::TryFrom, collections::HashMap, num::NonZeroU32, fmt, }; use super::{ CurrentTable, ParserContextAndErrors, TableValidator, TomlTable, Name, register_description::{ RegisterDescription, Extension, }, }; #[derive(Debug, PartialEq, Copy, C...
use super::db_id_format; use chrono::NaiveDateTime; use std::time::Instant; use diesel::{self, dsl::{count, sql}, pg::{expression::dsl::any, PgConnection}, result::QueryResult, ExpressionMethods, NullableExpressionMet...
use super::math_util; use super::gl; use super::gl_util; use super::random; use core::arch::x86; use gl::CVoid; use core::mem::{size_of,transmute}; use core::ops::{Add,Sub,Mul}; // Floating point constants picked for compressibility pub const FP_0_01 :f32 = 0.0100097656f32; // 0.01 pub const FP_0_02 :f32 = 0.0200...
#![allow(non_snake_case)] use crate::scanner::Action; #[derive(Debug, Clone)] pub struct DFA { pub num_states: usize, pub num_input: usize, pub num_lex_states: usize, pub entry_states: Vec<i32>, pub table: Vec<Vec<i32>>, pub is_final: Vec<bool>, pub action: Vec<Action>, } impl DFA { p...
use dora_parser::ast::visit::*; use dora_parser::ast::Stmt::*; use dora_parser::ast::*; use dora_parser::lexer::position::Position; use crate::baseline::asm::BaselineAssembler; use crate::baseline::ast::expr::*; use crate::baseline::ast::info::JitInfo; use crate::baseline::codegen::{ create_gcpoint, register_for_m...
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 //! Defines functionality for creating guest memory snapshots. // Currently only used on x86_64. #![cfg(target_arch = "x86_64")] use std::fmt::{Display, Formatter}; use std::fs::File; use std::io::SeekFr...
use crate::{hashmap::NP_HashMap}; use alloc::string::String; use crate::pointer::{NP_Vtable}; use crate::{pointer::{NP_Cursor}, schema::{NP_Parsed_Schema, NP_Schema_Addr}}; use crate::{memory::{NP_Memory}, pointer::{NP_Value}, error::NP_Error, schema::{NP_Schema, NP_TypeKeys}, json_flex::{JSMAP, NP_JSON}}; use alloc::...
/* Disclaimer: Portions of this file were originally published * by contributors/developers at [EdgeDB](https://github.com/edgedb). * By using this software, you are subject to all of their licenses * including those not explicitly defined in this file. */ #[cfg(not(windows))] #[macro_use] extern crate pretty_asser...
pub mod ir; pub mod scheme; pub mod vars; mod builtin; mod ty; use std::iter::once; use codespan::FileId; use codespan_reporting::diagnostic::{Diagnostic, Label}; use mlsub::auto::{flow, Automaton, StateId}; use mlsub::{BiunifyError, Polarity}; use crate::check::scheme::{ReducedScheme, Scheme}; use crate::check::ty...
// Copyright (C) 2020 ADVANCA PTE. LTD. // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
use std::env::var_os; use std::fs::File; use std::geobacter::platform::{Platform, spirv}; use std::io::{Write, Read}; use std::num::NonZeroU32; use std::path::Path; use std::process::Command; use std::sync::Arc; use tracing::*; use grt_core::AcceleratorTargetDesc; use grt_core::codegen::*; use grt_core::codegen::help...
#![allow(dead_code)] use crate::manifest::StoredArchive; use crate::repository::backend::{ self, common::{LockedFile, ManifestID, ManifestTransaction}, BackendError, Result, }; use crate::repository::{ChunkSettings, Key}; use async_trait::async_trait; use chrono::prelude::*; use futures::channel::mpsc; use...
// Copyright (C) 2022 Red Hat // SPDX-License-Identifier: Apache-2.0 //! This library provides a model implementation for the [logreduce](https://github.com/logreduce/logreduce) project. //! //! This module dispatch the abstract Content and Source to their implementationm e.g. the files module. use anyhow::{Context, ...
// Copyright 2020-2021 <NAME> under the terms of the MIT License as detailed // in the accompanying file README.md or <https://opensource.org/licenses/MIT>. //! TODO: Explain this file properly once it is stabler. Right now it is just a piece of refactoring the VUI code towards modularity. use std::error::Error; use ...
use super::MeshCommandWriter; use crate::components::{ DirectionalLightComponent, PointLightComponent, PositionComponent, SpotLightComponent, }; use crate::features::mesh::shadow_map_resource::ShadowMapResource; use crate::features::mesh::{ ExtractedDirectionalLight, ExtractedFrameNodeMeshData, ExtractedPointLi...
// Rust-oracle - Rust binding for Oracle database // // URL: https://github.com/kubo/rust-oracle // //----------------------------------------------------------------------------- // Copyright (c) 2017-2018 <NAME> <<EMAIL>>. All rights reserved. // This program is free software: you can modify it and/or redistribute it...
use std::{ cell::RefCell, collections::HashMap, ops::{DerefMut, Index, IndexMut}, rc::Rc, sync::Arc, }; use itertools::Itertools; use matrix_sdk::{ identifiers::{RoomId, UserId}, Room, }; use rumatui_tui::{ backend::Backend, layout::{Constraint, Direction, Layout, Rect}, style::...
use btoi::btoi; use core::fmt::Write; use hal::prelude::*; use hal::{gpio::SignalEdge, serial, stm32}; use infrared::protocols::nec::NecCommand; use rtic::Mutex; use ushell::*; pub const CMD_MAX_LEN: usize = 32; pub type Autocomplete = autocomplete::StaticAutocomplete<19>; pub type History = history::LRUHistory<{ CMD...
use crate::{tokens::TokenLookup, Eu4Date, Eu4Error, Eu4ErrorKind, Extraction}; use jomini::{ common::PdsDate, BinaryTape, BinaryToken, FailedResolveStrategy, TextWriterBuilder, TokenResolver, WriteVisitor, }; use std::{ collections::HashSet, io::{Cursor, Read, Write}, }; struct Eu4Visitor; impl WriteVi...
#[allow(dead_code)] mod util; use std::io; use std::time::Duration; use termion::screen::AlternateScreen; use termion::{event::Key, raw::IntoRawMode}; use tui::Terminal; use tui::backend::TermionBackend; use tui::style::{Style, Color}; use tui::layout::{Constraint, Layout}; use tui::widgets::{Widget, Block, Borders, ...
use std::collections::{HashMap, HashSet, VecDeque}; use std::hash::Hash; use elina::ast::{Abstract, Environment, Hcons, Interval, Manager, OptPkManager, Texpr, TexprBinop, TexprUnop}; use petgraph::dot::{Config, Dot}; use petgraph::graph::{EdgeIndex, EdgeReference, NodeIndex}; use petgraph::prelude::Dfs; use petgraph:...
// Copyright 2017 Parity Technologies (UK) Ltd. // // 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, mer...
//! Defines `Module` and related types. // TODO: Should `ir::Function` really have a `name`? // TODO: Factor out `ir::Function`'s `ext_funcs` and `global_values` into a struct // shared with `DataContext`? use super::HashMap; use crate::data_context::DataContext; use cranelift_codegen::binemit; use cranelift_codegen...
use crate::command_line_seek::CommandLineSeek; use crate::config::*; use crate::cosmic::playing::PosNums; use crate::cosmic::recording::Movement; use crate::cosmic::recording::Phase; use crate::cosmic::smart::square::AbsoluteAddress2D; use crate::cosmic::smart::square::FILE1U8; use crate::cosmic::universe::Universe; us...
use super::{errs, Backend, Config, Configure, LlEvent, LlEventLoop}; use crate::session::{Environment, SeqNumbers}; use crate::tagvalue::FieldAccess; use crate::tagvalue::FvWrite; use crate::tagvalue::Message; use crate::tagvalue::{DecoderBuffered, Encoder, EncoderHandle}; use crate::Buffer; use crate::FixValue; use fu...
use yew::services::reader::{File, FileData, ReaderService, ReaderTask}; use yew::{html, Component, ComponentLink, InputData, Html, ShouldRender}; use gba_emulator::{ gba::GBA, gamepak::GamePack, cpu::{ cpu::InstructionSet, cpu::ARM_PC, cpu::THUMB_PC }, }; use std::rc::Rc; use s...
use std::ffi::CString; use std::{marker, mem, ptr, str}; use crate::build::CheckoutBuilder; use crate::util::Binding; use crate::{raw, Error, Index, MergeOptions, Oid, Signature}; /// Rebase options /// /// Use to tell the rebase machinery how to operate. pub struct RebaseOptions<'cb> { raw: raw::git_rebase_optio...
//! Defines operations and data structures over taxons. use std; use std::cmp::Ordering::{Equal, Greater, Less}; use std::collections::HashMap; use std::collections::HashSet; use std::fs::File; use std::io; use std::io::BufRead; use std::ops::Index; use std::path::Path; use std::str::FromStr; use strum; use crate::ra...
//! The `thin_client` module is a client-side object that interfaces with //! a server-side TPU. Client code should use this object instead of writing //! messages to the network directly. The binary encoding of its messages are //! unstable and may change in future releases. use crate::bank::Bank; use crate::cluster...
use clap::{App, Arg}; use core_cube::win10::*; use ctrlc; use enigo::*; use env_logger; use lazy_static::lazy_static; use log::{debug, error, info}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex}; use std::{thread, time}; const KEYEVENT_THRESH_LR: usize = 15; const KEYEVENT_THRESH_UP: usize...
use kzg::{Fr, Poly}; use rand::{RngCore, SeedableRng}; use rand::rngs::StdRng; use blst_from_scratch::types::fr::FsFr; use blst_from_scratch::types::poly::FsPoly; pub fn create_poly_of_length_ten() { let poly = FsPoly::new(10).unwrap(); assert_eq!(poly.len(), 10); } pub fn poly_pad_works_rand() { let mut...
use std::fmt::Debug; use crate::{ get_naive_now, has_occurred, Action, Command, Duration, Instant, SharedState, Strength, Transition, TransitionInterpolation, }; use chrono::prelude::*; use std::sync::{Arc, Mutex}; pub enum Progress { Pending(Duration), Ready(Command), Error, } pub enum Keep { ...
use either::Either; use log::trace; use rustc_data_structures::fx::FxHashSet as HashSet; use rustc_hir::{ intravisit::{self, NestedVisitorMap, Visitor as HirVisitor}, BodyId, Expr, ExprKind, MatchSource, Stmt, }; use rustc_middle::{ hir::map::Map, mir::{ visit::{ MutatingUseContext, NonMutatingUseCont...
// // Copyright (c) 2017-2018, The MesaLock Linux Contributors // All rights reserved. // // This work is licensed under the terms of the BSD 3-Clause License. // For a copy, see the LICENSE file. // use {ArgsIter, MesaError, Result, UtilRead, UtilSetup, UtilWrite}; use fnv::FnvHashMap as HashMap; use libc; use nix; ...
// Copyright 2021 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use std::{ collections::VecDeque, mem, sync::{ mpsc::{channel, Receiver, Sender}, Arc, }, thread::{ JoinHan...
pub mod err; pub mod symbol; mod test; use azuki_syntax::{ast::*, visitor::AstVisitor}; use azuki_tac as tac; use err::Error; use std::{cell::RefCell, collections::HashMap, rc::Rc, todo}; use symbol::{NumberingCounter, ScopeBuilder, StringInterner}; use tac::{ builder::FuncBuilder, BBId, BinaryInst, Branch, Func...
// This file is part of yash, an extended POSIX shell. // Copyright (C) 2020 <NAME> // // 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 version 3 of the License, or // (at your option) ...
use crate::api::{CspSigner, CspThresholdSignError, ThresholdSignatureCspClient}; use crate::keygen::public_key_hash_as_key_id; use crate::secret_key_store::test_utils::TempSecretKeyStore; use crate::server::api::{ BasicSignatureCspVault, CspBasicSignatureError, CspBasicSignatureKeygenError, CspMultiSignatureErr...
mod util; mod constants; use libusb; pub use self::constants::*; use byteorder::{ByteOrder, LittleEndian}; use std::time::Duration; use std::thread; use std::convert::{AsRef, AsMut}; mod errors { error_chain!{ foreign_links { LibUsb(::libusb::Error); } } } pub use errors::*; #...
use std::{collections::{HashMap, HashSet}, iter::once}; use socha_client_base::{util::SCResult, xml_node::{FromXmlNode, XmlNode}}; use super::{BOARD_SIZE, Board, CORNERS, Color, Move, PIECE_SHAPES, PIECE_SHAPES_BY_NAME, Piece, PieceShape, Player, Team, Vec2}; /// A snapshot of the game's state. It holds the /// info...
// This example program may be used for any purpose proprietary or not. #[macro_use] extern crate adi; extern crate barg; extern crate libc; extern crate miniz_oxide; use std::env; use std::ffi::CString; // use std::fs::File; use adi::{ hid, screen::{ self, prelude::{*}, Viewer, }...
use std::cell::RefCell; use std::mem; use std::pin::Pin; use std::rc::Rc; use std::sync::Arc; use std::time::{Duration, Instant}; use std::{fmt, task::Poll}; use futures::future::Either; use futures::prelude::*; use tracing::{debug, error, info, warn}; use super::apply::{apply_package, ApplyError, ApplyStream, Availa...
// this is generated. #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(dead_code)] #![allow(unused_imports)] #![allow(unused_parens)] use std::ffi::c_void; extern crate va_list; use super::*; pub const SDL_ALPHA_OPAQUE: i32 = 255; pub const SDL_ALPHA_TRANSPARENT: i32...
// Copyright (c) SimpleStaking and Tezedge Contributors // SPDX-License-Identifier: MIT //! Sends blocks to the `protocol_runner`. //! This actor is responsible for correct applying of blocks with Tezos protocol in context //! This actor is aslo responsible for correct initialization of genesis in storage. use std::s...
use clap::{App, Arg}; use pixels::{Error, Pixels, SurfaceTexture}; use rand; use rand::Rng; use rand::rngs::{ThreadRng}; use std::fs::File; use std::io::Read; use std::{io, panic, thread, time}; use winit::{ dpi::LogicalSize, event::{Event, DeviceEvent, ElementState, KeyboardInput, ScanCode, WindowEvent}, event_l...
#![warn(missing_docs)] //! Generate markdown comparison tables from //! [Cargo Criterion](https://github.com/bheisler/cargo-criterion) benchmark JSON //! output. //! //! Currently, the tool is limited to Github Flavored Markdown (GFM), but adding //! new output types is relatively simple. //! //! ## Generated Markdown...
//! MiniDSP Control Program #![allow(clippy::upper_case_acronyms)] use std::{ fmt, fs::File, io::{BufRead, BufReader}, num::ParseIntError, path::PathBuf, str::FromStr, }; use anyhow::{anyhow, Result}; use bytes::Bytes; use clap::Clap; use debug::DebugCommands; use futures::{stream, StreamExt}...
use super::{find_parcel_start_data, ParcelAscentAnalysis, ParcelProfile}; use crate::{ error::{AnalysisError, Result}, interpolation::{linear_interp, linear_interpolate, linear_interpolate_sounding}, parcel::Parcel, sounding::Sounding, }; use itertools::{izip, Itertools}; use metfor::{self, Celsius, Cel...
// Copyright 2020 The MWC Developers // // 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/LICENSE-2.0 // // Unless required by applicable law or agreed...
//! `window_service` handles the data plane incoming blobs, storing them in //! blocktree and retransmitting where required //! use crate::blocktree::Blocktree; use crate::cluster_info::ClusterInfo; use crate::leader_schedule_cache::LeaderScheduleCache; use crate::repair_service::{RepairService, RepairStrategy}; use ...
#![allow(dead_code)] use crate::checking_fns::*; use crate::composite_fns::*; use crate::replacing_fns::*; use crate::style_fns::*; use crate::music_constants::*; pub fn get_solosequence(ss_title: &str) -> SoloSequence { //[&first[..], &second[..]].concat() let _vector_concat_example = [&IONIAN[..],&DORIAN[.....
// Copyright 2019 Zhizhesihai (Beijing) Technology Limited. // // 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/LICENSE-2.0 // // Unless required by a...
use crate::model::Event; use crate::GAuth; use chrono::Duration; use futures::{stream, StreamExt, TryStreamExt}; use google_calendar3::{api, CalendarHub}; use tracing::{debug, info, trace}; use std::collections::HashSet; use std::fmt::Write; pub struct GCal { calendar_id: String, hub: CalendarHub, dry_ru...
use libc; pub type SDL_Scancode = libc::c_uint; pub const SDL_SCANCODE_UNKNOWN :SDL_Scancode = 0; pub const SDL_SCANCODE_A :SDL_Scancode = 4; pub const SDL_SCANCODE_B :SDL_Scancode = 5; pub const SDL_SCANCODE_C :SDL_Scancode = 6; pub const SDL_SCANCODE_D ...
mod fclass; mod fenum; mod find_cache; mod finterface; mod java_code; mod map_class_self_type; mod map_type; mod rust_code; use log::debug; use proc_macro2::{Span, TokenStream}; use quote::quote; use rustc_hash::{FxHashMap, FxHashSet}; use smol_str::SmolStr; use std::{fmt, io::Write, path::PathBuf}; use syn::{spanned:...
/*! Converts ranges of Unicode scalar values to equivalent ranges of UTF-8 bytes. This is sub-module is useful for constructing byte based automatons that need to embed UTF-8 decoding. The most common use of this module is in conjunction with the [`hir::ClassUnicodeRange`](../hir/struct.ClassUnicodeRange.html) type. ...
use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext}; use rustc_ast as ast; use rustc_attr as attr; use rustc_errors::Applicability; use rustc_hir as hir; use rustc_hir::def::{DefKind, Res}; use rustc_hir::intravisit::FnKind; use rustc_hir::{GenericParamKind, PatKind}; use rustc_middle::ty; ...
// Copyright 2020 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
use std::collections::{BTreeMap, BTreeSet}; use maplit::btreeset; use abstutil::prettyprint_usize; use geom::{Duration, Time}; use map_gui::tools::{ grey_out_map, nice_map_name, ChooseSomething, CityPicker, PopupMsg, URLManager, }; use sim::{ScenarioModifier, SlidingWindow, TripMode}; use widgetry::{ lctrl, C...
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MI...
use std::prelude::v1::*; use std::time::*; use std::{ptr, str}; use sgx_tcrypto::*; use sgx_types::*; use anyhow::Result; use bit_vec::BitVec; use chrono::prelude::*; use chrono::Duration; use chrono::TimeZone; use chrono::Utc as TzUtc; use itertools::Itertools; use log::{debug, error, info, warn}; use num_bigint::Bi...
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use { crate::{ capability::{CapabilityProvider, CapabilitySource}, model::{ error::ModelError, moniker::AbsoluteMoniker, re...
use { crate::{ app::*, command::{Command, TriggerType}, display::{DisplayableTree, Screen, W}, errors::{ProgramError, TreeBuildError}, flag::Flag, git, pattern::*, path::{self, PathAnchor}, print, skin::PanelSkin, task_sync::Dam...
use std::{collections::BTreeMap, io}; use super::{ pread_exact_or_eof, read_message, read_segment_header, BasedBuf, DiskPtr, LogKind, LogOffset, LogRead, Lsn, SegmentHeader, SegmentNumber, MAX_MSG_HEADER_LEN, SEG_HEADER_LEN, }; use crate::*; #[derive(Debug)] pub struct LogIter { pub config: RunningCon...
use super::AddressMap; use crate::r; use kvproto::metapb::{self, Peer, PeerRole}; use kvproto::raft_serverpb::{RaftApplyState, RaftLocalState, RegionLocalState}; use protobuf::Message; use raft::eraftpb::{ConfState, Entry, Snapshot}; use raft::prelude::*; use raft::{Error, Result, StorageError}; use rocksdb::{DBOptions...
use crate::{ apply::ApplyContext, difference::{DiffCommandRef, DiffContext, DiffPathElementValue}, SerdeDiff, }; use serde::{de, ser::SerializeSeq, Deserialize, Serialize}; use std::{ collections::{BTreeMap, HashMap}, hash::Hash, }; macro_rules! array_impls { ($($len:tt)+) => { $( ...
#![cfg_attr(not(feature = "std"), no_std)] use common::{ codec_types::*, mtc::{ battle::organizer::{battle_all, select_battle_ghost_index}, ep::{calculate_new_ep, get_ep_band, EP_UNFINISH_PENALTY, INITIAL_EP}, result::build_ghost_from_history, setup::{build_initial_ghost_states,...
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // Functions for running benchmarks and storing the results as files, and for reading // those results and plotting them. use anyhow::anyhow; use bytecode::options::ProverOptions; use clap::{App, Arg}; use codespan_reporting::term::ter...
// Copyright 2016-2018 <NAME> <<EMAIL>> // // 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 // exce...
use super::{BackendResult, Error, Version, Writer}; use crate::{ AddressSpace, Binding, Bytes, Expression, Handle, ImageClass, ImageDimension, Interpolation, MathFunction, Sampling, ScalarKind, ShaderStage, StorageFormat, Type, TypeInner, }; use std::fmt::Write; bitflags::bitflags! { /// Structure used to ...