text
stringlengths
7.05k
33.9k
use super::{ffs, util, PlanesSep}; #[allow(unused_imports)] use super::{Bitmap, BlockMap, DisplayWrap, Point3, Point3i, Vec3, Vec3i}; use packed_simd::{f32x16, f32x2, f32x4, f32x8}; use rayon::prelude::*; use std::time::Instant; pub struct RadBuffer { pub r: Vec<f32>, pub g: Vec<f32>, pub b: Vec<f32>, } ty...
mod file_platform; use file_platform::ReadAtFile; use std::cmp::Ordering; use std::str::from_utf8; fn read_line_at(f : &ReadAtFile, mut pos : u64) -> Vec<u8> { let mut block = vec![]; let mut writing_to = 0usize; block.resize(512, 0u8); loop { let len = f.read_at(&mut block[writing_to..], pos).unwrap(); le...
use super::pbrt::{Float, is_power_of_2, round_up_pow2_i32, mod_t, log2_int_i32}; use super::stats_accumulator::StatsAccumulator; use super::profiler::Profiler; use super::geometry::{Point2i, Point2f, Vector2f}; use super::spectrum::{RGBSpectrum, SampledSpectrum}; use super::memory::BlockedArray; use super::texture::lan...
#![allow(unused_variables)] use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use na::{DMatrix, DVector, Norm, IterableMut}; #[derive(Serialize, Deserialize, Clone, Debug)] pub struct Network { pub layer_sizes: Vec<usize>, pub activation_coeffs: Vec<f32>, pub weights: Vec<DMatrix<f3...
use crate::{ ir::{ function::{ basic_block::{BasicBlock, BasicBlockId}, instruction::{Instruction, InstructionId, Opcode, Operand, Phi}, Function, }, value::{Value, ValueId}, }, pass::{analysis::dom_tree, transform::sccp::SCCP}, }; use rustc_hash::...
// Copyright (c) 2019, Facebook, Inc. // All rights reserved. // // This source code is licensed under the MIT license found in the // LICENSE file in the "hack" directory of this source tree. // // Implementation of string escaping logic. // See http://php.net/manual/en/language.types.string.php use std::char; use st...
//! PDF layer management. Layers can contain referenced or real content. use lopdf; use std::borrow::Borrow; use types::RegisteredXObject; use glob_defines::OP_PATH_STATE_SET_LINE_WIDTH; use lopdf::content::Operation; use { Color, CurTransMat, ExtendedGraphicsState, Font, Image, Line, LineCapStyle, LineDashPatter...
use num::FromPrimitive; use std::fmt; use std::num::Wrapping; use crate::utils; pub const ROM_BANK_SIZE: u16 = 0x4000; pub const RAM_BANK_SIZE: u16 = 0x2000; pub const RAM_ADDR: u16 = 0xA000; #[derive(Debug, PartialEq)] pub enum CGBFlag { DMGCompat = 0x80, CGBOnly = 0xC0, } #[cfg_attr(rustfmt, rustfmt_skip)...
// Copyright 2019 <NAME> // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those...
use rustling_ontology_values::check::*; use rustling_ontology_moment::*; use rustling_ontology_values::dimension::*; use rustling_ontology_values::ResolverContext; pub fn examples_finance(v: &mut Vec<::rustling::train::Example<Dimension>>) { example!(v, check_finance(10.0, Some("$"), Precision::Exact), "$10", "10$...
use crate::error::*; use super::register::Register; use super::bus::Bus; // instruction operation fn(instruction opcode, register, bus) -> consumed clock cycle pub type InstructionFn = fn(inst: u8, reg: &mut Register, bus: &mut Bus) -> GBResult<usize>; #[derive(Debug, PartialEq, Eq)] pub enum Instruction { // 8bi...
use crate::codegen::generate_ast::utils::KEYWORDS; use anyhow::Result; use heck::{CamelCase, ShoutySnakeCase, SnakeCase}; use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote}; use std::{collections::HashMap, convert::TryInto, panic}; use ungrammar::{Grammar, Rule}; /// The maximum number of allowed ...
// Enable some rust 2018 idioms. #![warn(bare_trait_objects)] #![warn(unused_extern_crates)] #[cfg(feature = "system_alloc")] use std::alloc::System; #[cfg(feature = "system_alloc")] #[global_allocator] static A: System = System; #[macro_use] extern crate clap; #[macro_use] extern crate log; use std::io::{BufWriter...
use std::{ cell::Cell, mem, }; use ash::{ version::{DeviceV1_0, InstanceV1_0}, vk, Device, Entry, Instance, }; use winit::dpi::PhysicalSize; use crate::{ math, prelude::* }; pub use crate::game::render_system::{Renderable, RenderableId}; use self::{ debug::DebugMessenger, initial...
#[macro_use] extern crate lazy_static; #[macro_use] extern crate serde_derive; extern crate time; extern crate zmq; extern crate iron; extern crate router; extern crate uuid; extern crate serde; extern crate serde_json; extern crate params; extern crate protobuf; extern crate hyper; use std::sync::Mutex; use std::co...
#![macro_use] use rustc_hash::FxHashMap; use std::ffi::CString; // use cpuprofiler::PROFILER; use super::callobj::{CallObject, CallObjectRef}; use super::error::*; use builtin; use builtin::{BuiltinFuncInfo, BuiltinFuncTy, BuiltinJITFuncInfo}; use builtins::function; use bytecode_gen::ByteCode; use gc; use id::Id; ...
// Copyright (c) 2018-2021 <NAME> <<EMAIL>> // Distributed under the MIT License // (See acoompanying LICENSE file or a copy at http://opensource.org/licenses/MIT) //! Implementación del cálculo de la U de una composión constructiva de opaco, según su posición //! - UNE-EN ISO 13789:2010 transmisión general //! - UNE-...
use std::mem; use config::DEFAULT_BLOCK_SIZE; use tuple::{TupleTableSlot}; use off::{OffsetNumber}; type LocationIndex = u16; // +----------------+---------------------------------+ // | PageHeaderData | linp1 linp2 linp3 ... | // +-----------+----+---------------------------------+ // | ... linpN | ...
use super::super::{debug::*, surface, swapchain::*}; use ash::{ extensions::{ ext::DebugReport, khr::{Surface, Swapchain as SwapchainLoader}, nv::RayTracing, }, version::{DeviceV1_0, EntryV1_0, InstanceV1_0}, vk, Device, Entry, Instance, }; use std::{ ffi::{CStr, CString}, ...
use petgraph::algo::dijkstra; use petgraph::graph::{DefaultIx, NodeIndex}; use petgraph::{Graph, Undirected}; use std::collections::HashMap; type Maze = Vec<Vec<char>>; #[allow(dead_code)] fn display(maze: Maze) { for (j, y) in maze.iter().enumerate() { for (i, _x) in y.iter().enumerate() { pr...
use std::convert::TryInto; use std::fs::File; use std::io::Read; use nanorand::Rng; use std::path::Path; // The original CHIP-8 interpreter occupies the first 512 bytes. // That way, every program starts at byte offset 0x200 (512). // All instructions are 2 bytes long and are stored most-significant-byte first (BIG EN...
use codec::{Decode, Encode, MaxEncodedLen}; use crate::sp_runtime::traits::Zero; use frame_support::{inherent::Vec, RuntimeDebug}; use scale_info::TypeInfo; use sp_runtime::{DispatchError, ArithmeticError, traits::{CheckedAdd, CheckedSub}}; use frame_support::traits::tokens::fungibles::Transfer; use crate::{Config, A...
use crate::base; use crate::common::CodegenCx; use crate::debuginfo; use crate::llvm::{self, True}; use crate::type_::Type; use crate::type_of::LayoutLlvmExt; use crate::value::Value; use libc::c_uint; use rustc_codegen_ssa::traits::*; use rustc_hir as hir; use rustc_hir::def_id::DefId; use rustc_hir::Node; use rustc_m...
//! The Logical Link Control and Adaptation Protocol (L2CAP). //! //! Note that LE and Classic Bluetooth differ quite a bit on this layer, even though they're //! supposed to share L2CAP. We're only implementing the LE bits. //! //! L2CAP provides "channels" to the upper layers that are mapped to the physical transport...
use crate::cubic_to_quadratic::single_curve_approximation; use crate::quadratic_bezier::FlattenedT as FlattenedQuadraticSegment; use crate::scalar::Scalar; use crate::CubicBezierSegment; ///! Utilities to flatten cubic bézier curve segments, implemented both with callback and ///! iterator based APIs. use crate::Point;...
#![cfg_attr(not(feature = "std"), no_std)] pub mod weights; /// Edit this file to define custom logic or remove it if it is not needed. /// Learn more about FRAME and the core library of Substrate FRAME pallets: /// https://substrate.dev/docs/en/knowledgebase/runtime/frame pub use pallet::*; pub use scale_info::TypeI...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Protocol for making and handling Remote Procedure Calls //! //! # SLURP: Simple Libra Unary Rpc Protocol //! //! SLURP takes advantage of [muxers] and [substream negotiation] to build a //! simple rpc protocol. Concretely, //! //! ...
//---------------------------------------------------------------------------// // Copyright (c) 2017-2022 <NAME>. All rights reserved. // // This file is part of the Rusted PackFile Manager (RPFM) project, // which can be found here: https://github.com/Frodo45127/rpfm. // // This file is licensed under the MIT license...
//! The [Value] trait describes what operations can be performed on interpreter values. The //! interpreter usually executes using [DataValue]s so an implementation is provided here. The fact //! that [Value] is a trait, however, allows interpretation of Cranelift IR on other kinds of //! values. use core::convert::Try...
use crate::{ assets::{Asset, Cache, Cached, Key, Loaded}, filesystem::Filesystem, graphics::*, Resources, }; use { hashbrown::HashMap, image::{Rgba, RgbaImage}, std::{borrow::Cow, ffi::OsStr, path::Path}, }; #[derive(Debug, Clone)] pub struct Font { inner: rusttype::Font<'static>, } /...
use std::ops::Range; use thiserror::Error; use crate::follow::Follow; use crate::{ForwardsUOffset, SOffsetT, SkipSizePrefix, UOffsetT, VOffsetT, Vector, SIZE_UOFFSET}; /// Traces the location of data errors. Not populated for Dos detecting errors. /// Useful for MissingRequiredField and Utf8Error in particular, thou...
/*! A [Kerning Table]( https://docs.microsoft.com/en-us/typography/opentype/spec/kern) implementation. Supports both [OpenType](https://docs.microsoft.com/en-us/typography/opentype/spec/kern) and [Apple Advanced Typography](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6kern.html) variants. Sin...
/* * Copyright 2019 The Starlark in Rust Authors. * Copyright (c) Facebook, Inc. and its affiliates. * * 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/lic...
// Inspired by https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs extern crate rustc_version_runtime; extern crate semver; extern crate toml; use std::ffi::{OsStr, OsString}; use std::fs::File; use std::io::BufRead; use std::io::BufReader; use std::io::Write; use std::path::Path; use st...
use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::fmt::Debug; use std::fs::File; use std::io::{self, Read, Write}; use std::num::ParseIntError; use std::path::Path; use std::str::FromStr; use std::{fs, u32}; use bincode; use byteorder::ByteOrder; use byteorder::{LittleEndian, WriteBytesExt}; use encoding::...
extern crate num_bigint; extern crate num_rational; extern crate num_traits; #[macro_use] extern crate over; use num_traits::ToPrimitive; use over::obj::Obj; use over::types::Type; use over::value::Value; use over::OverError; // Display nicely-formatted values on failure. macro_rules! test_eq { ($left:expr, $righ...
// surfman/surfman/src/platform/macos/system/surface.rs // //! Surface management for macOS. use crate::{Error, SurfaceAccess, SurfaceID, SurfaceType, SystemSurfaceInfo}; use super::device::Device; use super::ffi::{IOSurfaceGetAllocSize, IOSurfaceGetBaseAddress, IOSurfaceGetBytesPerRow}; use super::ffi::{IOSurfaceLock...
// https://en.wikipedia.org/wiki/MPEG_program_stream // https://en.wikipedia.org/wiki/Packetized_elementary_stream use std::ptr; use crate::bitbuf; #[allow(non_camel_case_types)] #[derive(Debug)] pub enum PacketError { OUT_LENGTH(usize), NO_START_CODE, FORMAT_ERROR, } #[allow(non_camel_case_types)] #[der...
use crate::draw::drawing::DrawingContext; use crate::draw::primitive::Primitive; use crate::draw::properties::spatial::{self, dimension, orientation, position}; use crate::draw::properties::{ ColorScalar, LinSrgba, SetColor, SetDimensions, SetOrientation, SetPosition, }; use crate::draw::{self, theme, Drawing}; use...
use std::cmp::Ordering; use smartnoise_validator::errors::*; use ieee754::Ieee754; use ndarray::{ArrayD, Axis, Zip}; use ndarray::prelude::IxDyn; use openssl::rand::rand_bytes; use smartnoise_validator::utilities::array::{slow_select, slow_stack}; pub mod mechanisms; pub mod noise; /// Accepts an ndarray and retur...
// Copyright 2015-2020 Parity Technologies (UK) Ltd. // This file is part of Open Ethereum. // Open Ethereum 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 o...
//! Window service - a wrapper for [`winit::window::Window`] instance. use crate::assets::Texture; use dotrix_math::{clamp_min, Vec2, Vec2i, Vec2u}; use winit::dpi::{PhysicalPosition, PhysicalSize, Position}; use winit::monitor::{MonitorHandle as WinitMonitor, VideoMode as WinitVideoMode}; use winit::window::{Icon as...
// Copyright (c) 2021 The Vulkano developers // Licensed under the Apache License, Version 2.0 // <LICENSE-APACHE or // https://www.apache.org/licenses/LICENSE-2.0> or the MIT // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, // at your option. All files in the project carrying such // notice may not be ...
use crate::syscalls; use crate::ALLOCATOR; use core::intrinsics; use core::ptr; // _start and rust_start are the first two procedures executed when a Tock // application starts. _start is invoked directly by the Tock kernel; it // performs stack setup then calls rust_start. rust_start performs data // relocation and s...
// Copyright (c) SimpleStaking and Tezedge Contributors // SPDX-License-Identifier: MIT //! Module which runs actor's very similar than real node runs #[cfg(test)] use std::collections::HashSet; use std::path::PathBuf; use std::sync::Arc; use std::thread; use std::time::{Duration, SystemTime}; use riker::actors::*; ...
#![feature(trait_alias)] use std; use std::rc::Rc; extern crate cursive; // use crate::models::Foci; use crate::models::focus_ring::Foci; // use crate::models::focus_ring::{ // DEBUG_VIEW, NEW_TAG, REPO_FIELD, TAG_DISPLAY, TAG_POOL, TEXT_VIEW, // }; use ring_queue::Ring; use std::fs::OpenOptions; use std::io::Wr...
//! Provides functions to print PTX code. use codegen::Printer; use codegen::*; use device::cuda::{Gpu, Namer}; use ir::{self, op, Type}; use itertools::Itertools; use search_space::{DimKind, Domain, InstFlag}; use std; use std::fmt::Write as WriteFmt; use std::io::Write; pub struct CudaPrinter { out_function: Str...
//! Code containing the scene used by the future, this tracks the state of the entire program. // Build in imports use std::process::exit; // Third party imports use kiss3d::{ camera::Camera, event::{Action, WindowEvent}, light::Light, planar_camera::PlanarCamera, post_processing::PostProcessingEf...
use codespan::{ByteIndex, ByteOffset, ByteSpan, FileMap, RawOffset}; use codespan_reporting::{Diagnostic, Label}; use std::fmt; use std::str::CharIndices; use unicode_xid::UnicodeXID; fn is_symbol(ch: char) -> bool { match ch { '&' | '!' | ':' | ',' | '.' | '=' | '/' | '>' | '<' | '-' | '|' | '+' | ';' | '...
use std::fmt::{Debug, Formatter}; use serde::{Deserialize, Serialize}; use crate::error::Error; use crate::models::chord::fmt::Formatting; use crate::models::chord::NoteDisplay; use crate::models::meta::{BNotation, SemitoneNotation}; use crate::modification::transposition::TransposableTrait; #[derive(Deserialize, Se...
//! This module contains the nc server message, trait and helper methods //! To use the server you have to implement the NCServer trait that has five methods: //! initial_data(): This method is called once for every node when the node registers with the server. //! prepare_data_for_node(): This method is called when th...
use app::new_app; use builder::SimulationBuilder; use clap::{ArgMatches, ErrorKind as ClapErrorKind, Result as ClapResult}; use failure::{err_msg, Error, ResultExt}; use files::{create_file_recursively, fs_timestamp}; use rayon::ThreadPoolBuilder; use simplelog::{CombinedLogger, Config, LevelFilter, SharedLogger, TermL...
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] pub struct MassOrder { /// MsgType = DJ #[serde(flatten)] pub standard_message_header: super::super::standard_message_header::StandardMessageHeader<'D', 'J'>, /// Unique identifier of MassOrder(35=DJ) message ...
#[macro_use] extern crate wascc_codec as codec; #[macro_use] extern crate log; use chunks::Chunks; use codec::blobstore::*; use codec::capabilities::{ CapabilityDescriptor, CapabilityProvider, Dispatcher, NullDispatcher, OperationDirection, OP_GET_CAPABILITY_DESCRIPTOR, }; use codec::core::{OP_BIND_ACTOR, OP_...
use num_derive::FromPrimitive; use crate::attribute::{Attribute, AttributeName}; use crate::character::character_common_data::CharacterCommonData; use crate::character::character_sub_stat::CharacterSubStatFamily; use crate::character::{CharacterConfig, CharacterName, CharacterStaticData}; use crate::character::skill_co...
use winit::{ event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, platform::run_return::EventLoopExtRunReturn, window::WindowBuilder, }; use ash::extensions::ext::DebugUtils; use ash::extensions::khr::Surface; use ash::extensions::khr::Swapchain; use ash::vk; use std::borrow::Cow; use st...
use std::fmt; use std::sync::Arc; use std::sync::mpsc::{channel, Sender, Receiver}; use std::thread; use serde::{Serialize, Serializer, Deserialize, Deserializer}; use {wip, wip::{QID,Dep,WIP,WorkState}}; use vhl::{HiLoPart, VHLParts}; use {vid::VID, nid::{NID}, vhl::{HiLo}}; use bdd::{ITE, Norm, BddState, BDDHashMap, ...
use crate::{ core::{ camera::{Camera, CameraDt}, film::FilmTile, geometry::{Bounds2i, Point2f, Point2i, Ray, RayDifferentials, Vector3f}, interaction::{Interaction, InteractionDt, MediumInteraction, SurfaceInteraction}, light::{is_delta_light, Light, LightDt, VisibilityTester...
//MIT License // //Copyright (c) 2019 basusamit // //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, ...
// Copyright (c) 2017 King's College London // created by the Software Development Team <http://soft-dev.org/> // // The Universal Permissive License (UPL), Version 1.0 // // Subject to the condition set forth below, permission is hereby granted to any // person obtaining a copy of this software, associated documentati...
use std::cell::RefCell; use std::rc::Rc; use crate::core::io::*; use crate::core::ram::*; use crate::core::register::RegisterArray; use wasm_bindgen::prelude::wasm_bindgen; pub type EResult<T> = Result<T, &'static str>; static CLOCK_CYCLES: [usize; 256] = [ 4, 10, 7, 5, 5, 5, 7, 4, 4, 10, 7, 5, 5, 5, 7, 4, 4...
// use rocket::request::FromRequest; use rocket::data::FromData; use rocket::Data; use rocket::fairing::{Fairing, Info, Kind}; use rocket::http::{Cookie, Cookies, MediaType, ContentType, Method, Status}; use rocket::Outcome; use rocket::request::{FlashMessage, Form, FromForm, FormItems, FromRequest, Request};...
pub(crate) mod communication_interface; pub use communication_interface::CommunicationInterface; use crate::config::TargetSelector; use crate::error; use crate::{ architecture::{ arm::{memory::ADIMemoryInterface, ArmCommunicationInterface}, riscv::{communication_interface::RiscvCommunicationInterf...
/// Implementation of the PostgreSQL server (database) protocol. /// Here we are pretending to the a Postgres client. use bytes::{Buf, BufMut, BytesMut}; use log::{debug, error, info, trace}; use tokio::io::{AsyncReadExt, BufReader}; use tokio::net::{ tcp::{OwnedReadHalf, OwnedWriteHalf}, TcpStream, }; use cra...
extern crate todo; extern crate formaters; extern crate logger; extern crate chrono; extern crate report; use todo::*; use logger::*; use formaters::dmy_format; use std::slice::Iter; use std::time::Duration; use chrono::{NaiveDate, Datelike, Local}; use report::*; extern crate serde; extern crate serde_json; //TODO ...
use crate::com::com_traits::{ IceCandidate, PeerConnectionStatus, Protocol, RtcMessage, RtcMetadata, SignalingAction, SignalingMessage, }; use crate::identity::Identity; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; use web_sys::{ MessageEvent, RtcAnswerOptions, RtcConfiguration, RtcDataChannel, ...
use crate::errors::ThresholdError; use curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT; use curve25519_dalek::ristretto::RistrettoPoint; use curve25519_dalek::scalar::Scalar; use rand_core::{CryptoRng, RngCore}; use std::convert::TryFrom; use std::vec; use std::vec::Vec; #[derive(Debug, Clone)] pub struct DKGR...
// Copyright 2017 Dropbox, 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 ag...
/// Pallet for realworld price oracle requests. /// /// For more guidance on Substrate modules, see the example module /// https://github.com/paritytech/substrate/blob/master/srml/example/src/lib.rs /// /// This module based on project written by <NAME> /// https://github.com/jimmychu0807/substrate-offchain-pricefetch ...
// Zinc, the bare metal stack for rust. // Copyright 2014 Dzmitry "kvark" Malyshau <<EMAIL>> // // 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/LICEN...
use std::str::FromStr; use std::fmt; use std::convert::From; use serde::{Deserialize, Serialize}; use regex::Regex; use lazy_static::lazy_static; use super::latex_utils::PageSize; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Section { Default, Index, DbSnp, Mapping, Calling, Ex...
mod error; mod service; mod ty; pub use self::{ error::DescriptorError, service::{MethodDescriptor, ServiceDescriptor}, ty::{ Cardinality, EnumDescriptor, EnumValueDescriptor, ExtensionDescriptor, FieldDescriptor, Kind, MessageDescriptor, OneofDescriptor, }, }; use std::{collections::H...
// Copyright 2020 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...
// Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0. use std::cmp::Ordering; use engine_traits::{IterOptions, Iterator, KvEngine, SeekKey, CF_WRITE}; use kvproto::metapb::Region; use kvproto::pdpb::CheckPolicy; use tidb_query_datatype::codec::table as table_codec; use tikv_util::keybuilder::KeyBuilder; ...
// Copyright 2016 <NAME>, The Alacritty Project Contributors // // 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 ...
use std::fmt::{self, Debug}; use std::io::{ErrorKind, Read, Write}; use std::path::{Path, PathBuf}; use log::warn; use super::file_armor::FileArmor; use super::sector::SectorMgr; use crate::base::crypto::{Crypto, Key}; use crate::base::utils; use crate::base::vio; use crate::error::{Error, Result}; use crate::trans::...
use std::path::{Path, PathBuf}; use std::process::{Command, ExitStatus}; use std::{env, fs}; use crate::cargo::Root; use crate::errors::*; use crate::extensions::{CommandExt, SafeCommand}; use crate::id; use crate::{Config, Target}; use atty::Stream; use eyre::bail; const DOCKER_IMAGES: &[&str] = &include!(concat!(en...
#![allow(non_snake_case)] use core::iter; use subtle::{Choice, ConditionallySelectable}; use curve25519_dalek::ristretto::{CompressedRistretto, RistrettoPoint}; use curve25519_dalek::scalar::Scalar; use curve25519_dalek::traits::{IsIdentity, MultiscalarMul, VartimeMultiscalarMul}; use merlin::Transcript; use crate::...
#[cfg(feature = "rt")] extern "C" { fn DMA0_DMA16(); fn DMA1_DMA17(); fn DMA2_DMA18(); fn DMA3_DMA19(); fn DMA4_DMA20(); fn DMA5_DMA21(); fn DMA6_DMA22(); fn DMA7_DMA23(); fn DMA8_DMA24(); fn DMA9_DMA25(); fn DMA10_DMA26(); fn DMA11_DMA27(); fn DMA12_DMA28(); fn D...
// Copyright 2021 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 agreed t...
use std::env::{current_dir, vars}; use std::io::{self, Write}; use std::{borrow::Cow, collections::HashMap}; use anyhow::{bail, Context, Result}; use clap::crate_version; use colors::Colors; use log::error; use pueue_lib::network::message::*; use pueue_lib::network::protocol::*; use pueue_lib::network::secret::read_s...
pub mod status; pub use status::*; use std::{ convert::TryFrom, fmt::Debug, io, net::SocketAddr, time::{Duration, Instant}, }; use bytes::Bytes; use crate::{ options::*, packet::*, protocol::{ handshake::Handshake, output::Output, receiver::{Receiver, ReceiverC...
//! Specific packets use std::error::Error; use std::fmt::{self, Debug}; use std::io::{self, Read, Write}; #[cfg(feature = "tokio")] use tokio::io::{AsyncRead, AsyncReadExt}; use crate::control::fixed_header::FixedHeaderError; use crate::control::variable_header::VariableHeaderError; use crate::control::ControlType;...
use super::{MaximalMicrotigsAlgorithm, Microtigs}; use crate::macrotigs::macronodes::Macronodes; use crate::restricted_reachability::{ compute_inverse_restricted_forward_reachability, compute_restricted_backward_reachability, compute_restricted_forward_reachability, }; use traitgraph::implementation::bit_vector...
use crate::{ error::*, parse_tree::*, semantic_analysis::{ ast_node::{ IsConstant, Mode, TypedCodeBlock, TypedDeclaration, TypedExpression, TypedExpressionVariant, TypedReturnStatement, TypedVariableDeclaration, }, TypeCheckArguments, }, type_engine::*...
use crate::http::tshark_http; use crate::http2::tshark_http2; use crate::pgsql::tshark_pgsql; use chrono::NaiveDateTime; use quick_xml::events::attributes::Attributes; use quick_xml::events::Event; use std::borrow::Cow; use std::fmt::Debug; use std::io::BufRead; use std::net::IpAddr; use std::path::PathBuf; use std::st...
use crate::{ objects::{ Auth0Token, Authorization, AuthorizationConfig, AuthorizationTask, FetcherConfig, JsError, }, utils, }; use super::{notifier, repo}; use chrono::{DateTime, Duration, FixedOffset, Utc}; use js_sys::ArrayBuffer; use podcast_player_common::{channel_val::ChannelVal, item_val::It...
// FIXME: Enable all warnings before the release //#![deny(missing_docs)] #![deny(missing_debug_implementations)] #![deny(rustdoc::broken_intra_doc_links)] #![cfg_attr(test, deny(warnings))] #![warn(rust_2018_idioms)] use std::{ collections::HashMap, io::{Error, ErrorKind, Result}, ops::Not, time::Dura...
// Copyright 2021 <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 anyhow::{Context, Result}; use itertools::Itertools; use std::fmt::Write as _; use std::fs::{File, OpenOptions}; use std::io::{prelude::*, SeekFrom}; use std::os::unix::io::AsRawFd; use crate::cpustat::{CpuStat, CpuTotals}; use crate::iostat::{IoStat, IoTotals}; #[derive(Clone, Copy, Debug, PartialEq)] pub enum S...
// Copyright 2020 Parity Technologies (UK) Ltd. // This file is part of Tetcoin. // Tetcoin 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) any later ...
use crate::net::TcpStream; pub use async_tls::server::TlsStream as ServerTlsStream; pub use async_tls::client::TlsStream as ClientTlsStream; pub use async_tls::TlsAcceptor; pub use async_tls::TlsConnector; pub type DefaultServerTlsStream = ServerTlsStream<TcpStream>; pub type DefaultClientTlsStream = ClientTlsStream<...
// // Vidoxide - Image acquisition for amateur astronomy // Copyright (c) 2020-2021 <NAME> <<EMAIL>> // // This project is licensed under the terms of the MIT license // (see the LICENSE file for details). // //! //! Video4Linux2 camera driver. //! extern crate ioctl_rs as ioctl; use crate::camera::*; use ga_image::...
#![allow(clippy::match_bool)] mod lexer; pub use lexer::{Token, TokenKind}; use ast::*; use codespan::Span; use logos::Lexer; use std::collections::VecDeque; pub type Result<T> = std::result::Result<T, ParseError>; pub enum Either<T, U> { Left(T), Right(U), } #[derive(Debug, PartialEq)] pub enum ParseErro...
#![macro_use] use crate::{ config::{CONFIGURATION, PROGRESS_PRINTER}, statistics::{ StatCommand::{self, AddError, AddStatus}, StatError::{Connection, Other, Redirection, Request, Timeout, UrlFormat}, }, FeroxError, FeroxResult, }; use console::{strip_ansi_codes, style, user_attended}; us...
use rand::{rngs::ThreadRng, Rng}; use std::convert::TryInto; use std::fs::File; use std::io::prelude::*; const CHARSET: [u8; 80] = [ 0xF0, 0x90, 0x90, 0x90, 0xF0, // 0 0x20, 0x60, 0x20, 0x20, 0x70, // 1 0xF0, 0x10, 0xF0, 0x80, 0xF0, // 2 0xF0, 0x10, 0xF0, 0x10, 0xF0, // 3 0x90, 0x90, 0xF0, 0x10, 0x...
use std::collections::HashMap; use error_chain::bail; use log::debug; use flowcore::output_connection::Source::{Input, Output}; use flowcore::output_connection::{OutputConnection, Source}; use crate::errors::*; use crate::generator::generate::GenerationTables; use crate::model::connection::Connection; use crate::mod...
//! Implements the interface for all input and output to the application. #![allow(clippy::pattern_type_mismatch)] mod fs; mod ui; pub(crate) use { fs::File, ui::{Dimensions, RowText, Style, StyledText, Unit, UserAction}, }; use { crate::app::{Document, ScopeFromRangeError}, clap::ArgMatches, core...
mod clone_cmd; mod compress_cmd; mod diff_cmd; mod info_cmd; mod string_utils; use anyhow::{anyhow, bail, Context, Result}; use clap::{App, Arg, SubCommand}; use reqwest::header::{HeaderMap, HeaderName, HeaderValue}; use std::path::Path; use std::time::Duration; use url::Url; use crate::string_utils::*; use bitar::ch...
use std::sync::Weak; use std::{ collections::VecDeque, ops::Div, sync::{Arc, RwLock}, }; use std::iter::FromIterator; use ndarray::{Array1, Array2, ArrayView1, ArrayView2, Axis}; use ndarray_linalg::{norm, Norm, NormalizeAxis}; use rayon::{ iter::{IndexedParallelIterator, IntoParallelIterator, Paralle...