text
stringlengths
7.05k
33.9k
// MIT License // //Copyright (c) 2018 <NAME> // //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, pu...
// Copyright 2015-2021 Swim Inc. // // 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 ...
use std::io; use std::io::Read; use std::str; use std::str::FromStr; #[cfg(test)] use nom::error::ErrorKind; use nom::{ branch::alt, bytes::streaming::{tag, take, take_till, take_till1}, character::streaming::{ alphanumeric1, char, digit1, multispace0, multispace1, none_of, one_of, }, combi...
#![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![forbid(clippy::indexing_slicing)] use anyhow::{anyhow, Context, Result}; use command::Command; use log::{debug, info, trace, warn}; use nom::{ bytes::complete::{take_until, take_until1}, error::VerboseError, }; use scan_result::ScanResult; use seri...
//! An implementation of the [`aSVC`]. //! //! [`aSVC`]: https://eprint.iacr.org/2020/527 #![cfg_attr(not(feature = "std"), no_std)] #![warn(unused, future_incompatible, nonstandard_style, rust_2018_idioms)] #![allow(clippy::op_ref, clippy::suspicious_op_assign_impl)] #![cfg_attr(not(use_asm), forbid(unsafe_code))] #![...
use super::{detector, errors, observer, protomitch, protomitch_pb, reactor, MemberInfo}; use byteorder::{NetworkEndian, ReadBytesExt}; use futures::prelude::*; use futures::{future, stream, sync::mpsc, sync::oneshot}; use native_tls; use std::{io, mem, net, time}; use stream_cancel; use tokio; use tokio_tls; use strea...
//! Our implementation of `IVpnPlugIn` which is the bulk of the UWP VPN plugin. use std::sync::{Arc, RwLock}; use std::time::Duration; use boringtun::noise::{Tunn, TunnResult}; use ipnetwork::IpNetwork; use windows::{ self as Windows, core::*, Networking::Sockets::*, Networking::Vpn::*, Networking...
#![allow(non_snake_case, unused_macros)] use rand::prelude::*; use proconio::input; use svg::{node::{element::{Circle, Path, Rectangle, path::Data, Line, Group, Title}, Text}, Document}; pub trait SetMinMax { fn setmin(&mut self, v: Self) -> bool; fn setmax(&mut self, v: Self) -> bool; } impl<T> SetMinMax for T whe...
use pretty::RcDoc; use std::{ cmp::Ordering, collections::{BTreeMap, HashMap}, fmt, iter, }; use rep_lang_concrete_syntax::{sp, util::pretty::parens}; use rep_lang_core::{ abstract_syntax::{primop_arity, Defn, Expr, Lit, Name, PrimOp, Program}, app, lam, util::calculate_hash, }; use StoCell::*...
use html5ever::{ QualName, Attribute }; use html5ever::tree_builder::{ TreeSink, QuirksMode, NodeOrText, ElementFlags }; use markup5ever::ExpandedName; use tendril::StrTendril; use std::borrow::Cow; use rustler::{ Env, Encoder, Term }; use crate::common::{ STW, QNW }; #[derive(Copy, Clone, PartialEq, Debug)] pub s...
use std::collections::HashMap; extern crate symbolic_polynomials; use symbolic_polynomials::*; #[allow(dead_code)] type TestMonomial = Monomial<String, i64, u8>; #[allow(dead_code)] type TestPolynomial = Polynomial<String, i64, u8>; #[test] pub fn constructor() { let a: TestPolynomial = variable("a".into()); ...
use crate::elog; use crate::error::{Context, AnyResult, WikitError}; use std::collections::HashMap; use std::convert::TryInto; use std::io::Read; use std::fs::File; use sqlx::postgres::PgPoolOptions; use nom::number::streaming::{be_u16, be_u32, be_u64, le_u32}; use nom::{regex, do_parse, tuple, map_res, take, count, ...
// Copyright 2021. The Tari Project // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the // following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following // disclai...
//! Timing tracking. //! //! This module implements some simple tracking information for timing of how //! long it takes for different units to compile. use super::{CompileMode, Unit}; use crate::core::compiler::BuildContext; use crate::core::PackageId; use crate::util::cpu::State; use crate::util::machine_message::{se...
use crate::conn::{Connection, ConnectionCommon, IoState, PlaintextSink, Reader, Writer}; use crate::error::Error; use crate::key; use crate::keylog::KeyLog; use crate::kx::SupportedKxGroup; #[cfg(feature = "quic")] use crate::msgs::enums::AlertDescription; use crate::msgs::enums::ProtocolVersion; use crate::msgs::enums...
/* Copyright 2015 Google Inc. All rights reserved. Copyright 2017 <NAME>. All rights reserved. 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...
use crate::{ buffer::{CellBuffer, Contacts, Span}, fragment, fragment::Circle, Cell, Point, Settings, }; use lazy_static::lazy_static; use std::{collections::BTreeMap, iter::FromIterator}; // These are circle map, when a group is detected to have these set of characters // arrange together in such this...
// Copyright 2015-2016 <NAME> <<EMAIL>> // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This file may not be // copied, modified, or distributed except according...
//! Provides a context in which to compile and execute code. use std::cell::RefCell; use std::fs::File; use std::io::{stderr, Read, Write}; use std::path::{Path, PathBuf}; use std::rc::Rc; use std::time::Instant; use crate::bytecode::Code; use crate::compile::compile; use crate::error::Error; use crate::exec::{call_f...
// 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 { fidl_fuchsia_hardware_audio::*, fuchsia_async as fasync, fuchsia_zircon::{self as zx, DurationNum, HandleBased}, futures::task::Waker...
// Copyright 2019 The vault713 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 a...
//! Raw tokens and tokenization. //! //! Raw tokens differ from "ordinary" tokens in that they are lossless and point back into the //! original source string. Lexing them requires no auxiliary state (such as interners) and can //! never fail. To validate a raw token and convert it to a "real" token, use //! [`crate::...
use std::io::{Read, Write}; use groupy::{CurveAffine, CurveProjective, EncodedPoint}; use serde::{Deserialize, Serialize}; use crate::bls::{Compress, Engine}; use crate::groth16::aggregate::{commit, srs}; use crate::SynthesisError; #[derive(Clone)] pub struct AggregateProofAndInstance<E:Engine> { pub pi_agg: Agg...
use crate::error::*; use crate::io::{Cursor, NoStdWrite}; use crate::message::{NowString128, NowString16, NowString256, NowString32, NowString64}; use crate::serialization::{Decode, Encode}; use alloc::boxed::Box; // NOW_SYSTEM_INFO __flags_struct! { WindowsProductFlags: u16 => { client = CLIENT = 0x0001,...
#![allow(unknown_lints, proc_macro_back_compat)] #[macro_use] extern crate glium; use glium::index::PrimitiveType; #[allow(unused_imports)] use glium::{glutin, Surface}; use ouroboros::self_referencing; use std::io::Cursor; mod support; pub struct Dt { depthtexture: glium::texture::DepthTexture2d, textures:...
use tonic::{Request, Response, Status}; use bazelfe_protos::*; use futures::{Stream, StreamExt}; use google::devtools::build::v1::publish_build_event_server::PublishBuildEvent; use google::devtools::build::v1::{ PublishBuildToolEventStreamRequest, PublishBuildToolEventStreamResponse, PublishLifecycleEventRequ...
use crate::debug_protocol::Expressions; use regex::{Captures, Regex, RegexBuilder}; #[derive(Debug)] pub enum PreparedExpression { Native(String), Simple(String), Python(String), } #[derive(Debug, Clone)] pub enum HitCondition { LT(u32), LE(u32), EQ(u32), GE(u32), GT(u32), MOD(u32)...
use anyhow::{format_err, Error}; use async_trait::async_trait; use chrono::{DateTime, Utc}; use itertools::Itertools; use log::info; use postgres_query::query; use rayon::iter::{ IndexedParallelIterator, IntoParallelIterator, IntoParallelRefIterator, ParallelIterator, }; use std::{ collections::HashMap, con...
use bevy::math::prelude::*; use crate::{ map::{Bitmap, Dir, Plane, PlaneScene, PlanesSep}, util::ProfTimer, }; use image::ImageBuffer; use rayon::prelude::*; use std::{ cmp::Ordering, fmt::Debug, io::{BufReader, BufWriter}, sync::Arc, }; fn normal_cull(pl1: &Plane, pl2: &Plane) -> bool { le...
use crate::{blockforest::BlockForest, proto, utxoset::UtxoSet}; use bitcoin::hashes::Hash; use bitcoin::{Block, BlockHash, Network, OutPoint, TxOut, Txid}; use lazy_static::lazy_static; use std::collections::HashSet; use std::str::FromStr; lazy_static! { static ref DUPLICATE_TX_IDS: [Txid; 2] = [ Txid::fro...
#![allow(unreachable_patterns)] //! This module deals with audio playback. #[cfg(feature = "mp3")] mod mp3; #[cfg(feature = "wav")] mod wav; #[cfg(feature = "ogg")] mod ogg; mod resample; use std::{ collections::VecDeque, error, fmt, iter::{self, Peekable}, sync::mpsc, sync::Arc, thread,...
use glow::*; use hashbrown::HashMap; use notan_graphics::prelude::*; use notan_graphics::DeviceBackend; mod buffer; mod pipeline; mod render_target; mod texture; mod to_glow; mod utils; use crate::buffer::Kind; use crate::pipeline::get_inner_attrs; use crate::texture::texture_format; use crate::to_glow::ToGlow; use b...
use proc_macro2::{Span, TokenStream}; use quote::quote; use syn::parse::{Parse, ParseStream}; use syn::{ Attribute, AttributeArgs, Block, FnArg, Generics, Ident, Item, ItemFn, NestedMeta, PatType, Result, ReturnType, Type, TypeTuple, Visibility, }; /// A function that can be wrapped in the Perseus test sub-har...
use super::*; use chrono::{DateTime, Utc}; use regex::Regex; use roblox::*; use serenity; use std::cmp::max; use std::time::SystemTime; use util; // TODO: Check role existence. // TODO: Consider moving error messages back into roles.rs // TODO: Support force updating an user. lazy_static! { static ref MENTION_RE...
use super::*; use crate::subspace::Rotor; #[inline(always)] pub(crate) fn exp_selected<B1,B2,T:RefRealField,N:Dim>(x:B1, one:B2, epsilon: T::RealField) -> B2 where B1: MultivectorSrc<Scalar=T,Item=T,Dim=N>+Clone+DivAssign<T> + Debug, for<'a> &'a B1: MultivectorSrc<Scalar=T,Dim=N>, B2: MultivectorSrc<Scala...
// Copyright 2017 - 2019 <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 // except ac...
//! The purpose of the pipeline execution module is to create commands from //! supplied pieplines, and manage their execution thereof. That includes //! forking, executing commands, managing process group //! IDs, watching foreground and background tasks, sending foreground tasks to //! the background, handling pipeli...
/* MIT License Copyright (c) 2021 Roblox 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, distrib...
use super::common::{Field, Name, Order}; use super::Variant; use crate::error::io_err; use crate::error::AvrowErr; use crate::error::AvrowResult; use crate::schema::common::validate_name; use crate::value::FieldValue; use crate::value::Value; use indexmap::IndexMap; use serde_json::{Map, Value as JsonValue}; use std::b...
/// This is what evaluates every pull-request use crate::acl::ACL; use crate::checkout; use crate::commitstatus::{CommitStatus, CommitStatusError}; use crate::config::GithubAppVendingMachine; use crate::files::file_to_str; use crate::message::{buildjob, evaluationjob}; use crate::nix; use crate::stats::{self, Event}; u...
#[cfg(feature = "parallel")] use rayon::prelude::*; use crate::dynamics::RigidBodySet; use crate::geometry::contact_generator::{ ContactDispatcher, ContactGenerationContext, DefaultContactDispatcher, }; use crate::geometry::proximity_detector::{ DefaultProximityDispatcher, ProximityDetectionContext, ProximityD...
// Copyright © 2020, Oracle and/or its affiliates. // // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // // Portions Copyright 2017 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be //...
//! Circuit Lab Simulation software, developed by Sleep Ibis LLC and funded by Northwestern University, //! is circuit simulation software specifically designed to assist teachers in designing and //! deploying circuit labs for beginning physics/engineering students. //! The program runs on Windows, MacOs and Linux op...
use std::{ cell::RefCell, sync:: Arc, }; use crate::{database::sled::SledEventDatabase, derivation::basic::Basic, derivation::self_addressing::SelfAddressing, derivation::self_signing::SelfSigning, error::Error, event::sections::seal::{ DigestSeal, Seal }, event::{ event_data::Event...
#[cfg(test)] pub mod test; use std::io; use bitflags::bitflags; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use failure::Fail; use num_derive::{FromPrimitive, ToPrimitive}; use num_traits::{FromPrimitive, ToPrimitive}; use crate::{ impl_from_error, try_read_optional, try_write_optional, utils, ut...
/* Copyright (c) 2020 <NAME> 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, distribute, sublicen...
// Copyright 2018 The Grin 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 agree...
use std::collections::VecDeque; use std::io; use std::mem; use std::net::SocketAddr; use std::pin::Pin; use std::task::{Context, Poll}; use std::u16; use futures::prelude::*; use generic_array::typenum::consts::U16; use generic_array::GenericArray; use num_traits::ToPrimitive; use slog::{o, Logger}; use tokio::io::Rea...
// btleplug Source Code File // // Copyright 2020 Nonpolynomial Labs LLC. All rights reserved. // // Licensed under the BSD 3-Clause license. See LICENSE file in the project root // for full license information. // // Some portions of this file are taken and/or modified from Rumble // (https://github.com/mwylde/rumble)...
/// The operations used in Koto bytecode /// /// Each operation is made up of a byte, followed by N additional bytes that define its behaviour. /// The combined operation bytes are interpreted as an [Instruction](crate::Instruction) by the /// [InstructionReader](crate::InstructionReader). /// /// In the comments for e...
use anyhow::Error; use serde_json::json; use stdweb::traits::*; use stdweb::unstable::TryInto; use stdweb::web::html_element::CanvasElement; use stdweb::web::Date; use stdweb::web::FillRule; use stdweb::web::{document, window, CanvasRenderingContext2d}; use yew::format::Json; use yew::services::fetch::{FetchService, Fe...
// 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::commands::prelude::*; use crate::config::PokemonEmoji; use crate::constants::*; use crate::traits::{ChannelExt, Embedable, Paginator}; use crate::types::Ref; use crate::Result; use core::time::Duration; use db::DbInstance; use futures::future; use magic::import_all; use magic::traits::MagicIter; use pokemon_...
use serde::{Deserialize, Serialize}; /// This crate provides basic helper types (structs and enums) and parsing routines to work with /// Twinleaf binary "TIO" packets. This crate tries to use as few dependencies and standard library /// features as possible, which would make it possible to use this code in multiple co...
use quicli::prelude::*; use std::collections::HashMap; use std::convert::From; use std::ffi::OsString; use std::fmt; use std::fs; use std::fs::File; use std::io::ErrorKind; use std::io::Write; use std::marker::PhantomData; use std::path::PathBuf; use std::result::Result as Res; use std::str::FromStr; use promptly::{pr...
use alloc::{string::String, sync::Arc, vec::Vec}; use spin::{Mutex, RwLock}; use lazy_static::*; use super::{ BlockDevice, // Bitmap, // SuperBlock, // DiskInode, // DiskInodeType, Inode, get_block_cache, }; use crate::{fat_layout::{ATTRIBUTE_DIRECTORY, FAT, FREE_CLUSTER, FSInfo, FatBS, FatE...
use crate::database::ExecutedAction; #[cfg(test)] use crate::database::{ActionType, LinkedItem}; use database::DisplayMode; use diesel::prelude::*; use regex::Regex; use skim::prelude::*; use std::borrow::Borrow; use std::collections::HashMap; use std::env; use std::io::Write; use std::path::Path; use std::path::PathBu...
// lisp inspired language // very good very nice use std::{env, fs, path::Path, process::exit, collections::HashMap, io::Write}; #[derive(Debug, Clone)] #[derive(PartialEq)] enum TokenKind { FUNCTION, STRING, INT, VOID, BOOL, WORD, ARRAY, } #[derive(Debug, Clone)] struct Token { kind:...
#![allow(clippy::identity_op)] use crate::asm::operation::{Address, Condition, Reg}; use crate::cartridge::Cartridge; use crate::joypad::Joypad; use crate::ppu::Ppu; use crate::timer::Timer; use serde::{Deserialize, Serialize}; #[derive(Copy, Clone, Debug)] pub enum Flag { Z, N, H, C, } #[derive(Copy, Clone, ...
use crate::sbox::Sbox; use crate::targets::Cipher; use crate::{bit, bit::Bit, bit::*}; use std::cell::RefCell; pub struct Prince { n_rounds: usize, message_length: usize, key_length: usize, constants: Vec<Vec<Bit>>, inv_table: Vec<u8>, m_prime: Vec<String>, whitening: bool, sbox: RefCel...
//! # xcli-rs //! //! A CLI implementation in Rust that is based on Rustyline. //! //! **Supported Platforms** //! * Unix //! * Windows //! * cmd.exe //! * Powershell //! * MacOS (not tested yet) //! //! **Note**: //! * " quoted argument is not supported //! * No prompt is shown when running on non-tty device. Need a s...
use tracing_core::{ collect::{Collect, Interest}, metadata::Metadata, span, Event, LevelFilter, }; use crate::{ filter, registry::LookupSpan, subscribe::{Context, Subscribe}, }; #[cfg(all(feature = "registry", feature = "std"))] use crate::{filter::FilterId, registry::Registry}; use core::{ ...
//! The raw node of the raft module. //! //! This module contains the value types for the node and it's connection to other //! nodes but not the raft consensus itself. Generally, you'll interact with the //! RawNode first and use it to access the inner workings of the consensus protocol. // Copyright 2016 PingCAP, Inc...
use std::collections::{BTreeSet, HashMap, HashSet}; use std::path::PathBuf; use std::sync::{Arc, Mutex}; use filetime::FileTime; use jobserver::Client; use crate::core::compiler::{self, compilation, Unit}; use crate::core::PackageId; use crate::util::errors::{CargoResult, CargoResultExt}; use crate::util::profile; u...
use std::fmt; #[derive(Debug, Clone)] struct Tile { id: i64, data: Vec<Vec<bool>>, all_hashes: Vec<i32>, top_hash: i32, right_hash: i32, bottom_hash: i32, left_hash: i32, } trait Image { fn new(id: i64, data: Vec<Vec<bool>>) -> Self where Self: Sized; fn id(&self) -> i6...
use crate::path_find::PathFind; use pyo3::prelude::*; // extern crate test; use std::collections::HashSet; use super::chokes::{group_chokes, Choke}; use crate::mapping::chokes::solve_chokes; use crate::mapping::climb::modify_climb; use crate::mapping::map_point; use crate::mapping::map_point::Cliff; const DIFFERENCE...
#![doc(html_root_url = "https://docs.rs/slotmap/1.0.6")] #![crate_name = "slotmap"] #![cfg_attr(all(nightly, feature = "unstable"), feature(try_reserve))] #![cfg_attr(all(not(test), not(feature = "std")), no_std)] #![cfg_attr(all(nightly, doc), feature(doc_cfg))] #![warn( missing_debug_implementations, trivial_...
// Copyright 2021 The Matrix.org Foundation C.I.C. // // 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...
// Copyright 2013 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-MIT or ...
//! Provides sourcemap validation functionality. use std::collections::{HashMap, HashSet}; use std::ffi::OsStr; use std::iter::FromIterator; use std::mem; use std::path::PathBuf; use std::str; use console::style; use failure::{bail, Error}; use if_chain::if_chain; use log::{debug, info, warn}; use symbolic::debuginfo:...
use std::path::*; use std::fs::*; use std::io::Read; use std::os::raw::*; use std::ffi::CString; // switch vid and pid while in RCM mode const SWITCH_VID:&str = "0955"; //"090c"; test usb device vid and pid const SWITCH_PID:&str = "7321"; //"1000"; pub struct SwitchRCM{ vid: String, pid: String, ...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control Register"] pub ctrl: CTRL, #[doc = "0x04 - Command Register"] pub cmd: CMD, #[doc = "0x08 - State Register"] pub state: STATE, #[doc = "0x0c - Status Register"] pub status: STATUS, #[doc = "0x10 ...
use std::f32::NAN; use std::sync::{Arc, RwLock}; use std::thread; use std::io::Error; use std::time::{Duration}; use uorb_codec::common::*; use uorb_codec::{self, UorbHeader, UorbMessage, UorbMsgMeta}; use crate::connection::UorbConnection; use flighty::simulato::Simulato; use flighty::physical_types::*; /// mult...
use std::{ collections::{HashMap, HashSet}, convert::TryFrom, rc::Rc, }; use crate::{ pages::{Content, ContentFeed, Home, LivePage, Settings, Start}, utils::{IpfsService, LocalStorage, Web3Service}, }; use wasm_bindgen_futures::spawn_local; use serde::de::DeserializeOwned; use yew::{ prelude...
//! Main data structure, see [`Cache`]. use super::{backend::CacheBackend, loader::Loader}; use futures::{ future::{BoxFuture, Shared}, FutureExt, TryFutureExt, }; use observability_deps::tracing::debug; use parking_lot::Mutex; use std::{collections::HashMap, hash::Hash, sync::Arc}; use tokio::{ sync::ones...
#![deny(warnings)] extern crate orbclient; extern crate orbimage; extern crate orbfont; use std::{cmp, env}; use std::collections::BTreeMap; use std::fs::{self, File}; use std::process::Command; use std::string::{String, ToString}; use std::vec::Vec; use orbclient::{event, Color, EventOption, MouseEvent, Window}; us...
// Copyright 2020 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 { anyhow::{Context, Error}, fidl::endpoints::Proxy, fidl_fuchsia_hardware_block_partition::{Guid, PartitionProxy}, fidl_fuchsia_io as f...
//! Abstractions/traits for an Abstract Domain use error::*; use il; use serde::Serialize; use std::collections::{HashMap}; use std::cmp::{Ordering, PartialEq, PartialOrd}; use std::fmt::Debug; /// An abstract value pub trait Value: Clone + Debug + PartialEq + PartialOrd { /// Join this abstract value with anoth...
use crate::{ types::{AcrDriver, ScanFrequency, Source}, Error, HttpRequest, Response, Tenable, }; use http::{header::HeaderValue, status::StatusCode, Method, Request}; use serde::{Deserialize, Serialize}; use std::{borrow::Cow, fmt}; /// Request Object for the `asset_by_uuid` function #[derive(Clone, Debug)] p...
use std::process::Command; use std::{ collections::HashSet, fs::{File, Permissions}, io::Write, path::Path, }; use std::{env, fs}; use std::{os::unix::fs::PermissionsExt, path::PathBuf}; use anyhow::{anyhow, bail, Context, Result}; use fdo_data_formats::{ constants::HashType, messages::to2::{D...
//! Defines types used for distributed key generation. use super::*; use crate::{ crypto::threshold_sig::ni_dkg::{ config::NiDkgConfig, NiDkgDealing, NiDkgId, NiDkgTag, NiDkgTargetId, NiDkgTranscript, }, ReplicaVersion, }; use ic_protobuf::types::v1 as pb; use serde_with::serde_as; use std::collect...
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. use crate::cache; use crate::cache::CacherLoader; use crate::colors; use crate::compat; use crate::create_main_worker; use crate::display; use crate::emit; use crate::file_watcher; use crate::file_watcher::ResolutionResult; use crate::flags::Be...
use std::borrow::{Borrow, Cow}; use std::str::FromStr; use std::fmt; use http::Header; use http::hyper::mime::Mime; use http::ascii::{uncased_eq, UncasedAscii}; /// Representation of HTTP Content-Types. /// /// # Usage /// /// ContentTypes should rarely be created directly. Instead, an associated /// constant should ...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Clock output configuration register"] pub pin_ctrl: crate::Reg<pin_ctrl::PIN_CTRL_SPEC>, #[doc = "0x04 - Configuration register for pad GPIO0"] pub gpio0: crate::Reg<gpio0::GPIO0_SPEC>, #[doc = "0x08 - Configuration reg...
//! Kubernetes API client wrapper. use anyhow::{anyhow, Context}; use k8s_openapi::{ api::core::v1::{Namespace, Node, PersistentVolumeClaim, Pod, Service}, apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition, apimachinery::pkg::api::resource::Quantity, NamespaceResourceScope...
// // Copyright 2015 <NAME> // Copyright 2015 The Rust Project Developers. // // See LICENSE file at top level directory. // extern crate libc; use self::MapError::*; use self::MapOption::*; use self::MemoryMapKind::*; use libc::{c_int, c_void}; use std::error::Error; use std::fmt; use std::io; use std::ops::Drop; us...
//! This is a platform agnostic Rust driver for the MAX3010x high-sensitivity //! pulse oximeter and heart-rate sensor for wearable health, based on the //! [`embedded-hal`] traits. //! //! [`embedded-hal`]: https://github.com/rust-embedded/embedded-hal //! //! This driver allows you to: //! - Get the number of samples...
extern crate wow_combat_log; extern crate chrono; extern crate clap; use std::fs::File; use std::io::BufReader; use std::collections::{HashMap, HashSet}; use std::fmt; use chrono::Duration; use clap::{Arg, App}; use wow_combat_log::Entry; static MASTERY_AURAS: &'static [u32] = &[ 33763, // Lifebloom 774, // R...
use std::cmp::Ordering; use std::collections::HashMap; use std::fmt; use std::ops::Index; use std::ops::Neg; pub type Pip = usize; pub fn pip_from_components(position: usize, value: usize) -> Pip { // N.B., We don't need a "head" field because the "position" (i.e., program // counter) is ALWAYS greater than 0 ...
#![cfg_attr(not(feature = "std"), no_std)] mod sp_merkle; use codec::{Decode, Encode}; use frame_system::{ ensure_signed, ensure_root, offchain::{ AppCrypto, CreateSignedTransaction, SendSignedTransaction, Signer, }, }; use sp_core::crypto::KeyTypeId; use sp_runtime::{ offchain::{ ...
use crate::error::ThrottleError; use rand::random; use std::{ cmp::Ordering, collections::HashMap, time::{Duration, Instant}, }; /// Peers hold locks to semaphores, while holding this locks they have access to the semaphore. struct Lock { /// Name of the resource the semaphore protects semaphore: S...
//! UUID support for BSON. //! //! ## The [`crate::Uuid`] type //! //! The BSON format supports UUIDs via the "binary" type with the UUID subtype (4). //! To facilitate working with these UUID-subtyped binary values, this crate provides a //! [`crate::Uuid`] type, whose `serde` implementation automatically serializes t...
use encoding_rs as enc; use crate::Transcoder; /// Encoding detector for I18nReader. #[derive(Debug)] pub struct I18nReaderEncodingDetector { bytes_to_guess: usize, non_ascii_to_guess: usize, non_text_threshold: u8, buffer: Vec<u8>, read_buffer: Vec<u8>, write_buffer: Vec<u8>, had_replacem...
//! IPC Transport for *nix #[cfg(unix)] extern crate tokio_uds; use std::collections::BTreeMap; use std::io::{self, Read, Write}; use std::path::Path; use std::sync::{atomic, Arc}; #[cfg(unix)] use self::tokio_uds::UnixStream; use crate::api::SubscriptionId; use crate::helpers; use crate::rpc; use crate::transports...
// // Copyright 2018-2019 <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 w...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #![allow(clippy::unreadable_literal)] pub mod asan; pub mod fast_fail; pub mod vcpp_debugger; pub mod verifier_stop; use std::{fmt, path::Path}; use debugger::stack; use log::error; use win_util::process; use winapi::um::{ minwinbase::{ ...
//! The register machine use std::collections::HashMap; use std::sync::Arc; use log::{debug, info, trace, warn}; use super::{ errors::{MResult, MachineError, ProcedureError, RegisterError, TypeError}, procedure::Procedure, register::Register, stack::Stack, value::{values_to_str, ToValue, Value}, ...
use crate::error::Error; /// A singleton object representing the AES-128-GCM AEAD scheme pub(crate) const AES128GCM_IMPL: AeadScheme = AeadScheme(&Aes128Gcm); /// Size of opening / sealing keys, in bytes const AES_128_GCM_KEY_SIZE: usize = 128 / 8; /// Size of tag, in bytes const AES_128_GCM_TAG_SIZE: usize = 128 / 8...
use env_logger; use font8x8::{UnicodeFonts, BASIC_FONTS}; use log::{error, info}; use pixels::{Error, Pixels, SurfaceTexture}; use rayon::prelude::*; use std::time::{Duration, Instant}; use winit::dpi::{LogicalSize, PhysicalPosition}; use winit::event::{Event, VirtualKeyCode}; use winit::event_loop::{ControlFlow, Event...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Oscillator power down register"] pub osc_pdr: crate::Reg<osc_pdr::OSC_PDR_SPEC>, _reserved1: [u8; 0x0c], #[doc = "0x10 - PLL power down register"] pub pll_pdr: crate::Reg<pll_pdr::PLL_PDR_SPEC>, #[doc = "0x14 - PLL ...