text
stringlengths
9.08k
47.9k
//! //! The op module contains functions related to assembly //! operation codes //! use std::collections::HashMap; use assembler::Interm; use util; #[derive(Debug)] pub struct Instruction { index: u16, opcode: u32, } #[derive(Debug)] enum ObjectCode { Short(u16), Long(u32), } /// /// Length returns...
use std::{ fs::{File, metadata}, io::{Read, Write, BufReader, BufWriter, BufRead}, env, time::Instant, path::Path, }; // Convenience functions for buffered I/O --------------------------- #[derive(PartialEq, Eq)] enum BufferState { NotEmpty, Empty, } trait BufferedRead { fn read_byte(&...
use std::collections::HashMap; use std::fmt; #[derive(Debug, Deserialize)] pub struct Response<T> { #[serde(rename = "Response")] pub response: Option<T>, #[serde(rename = "ErrorCode")] pub error_code: i32, #[serde(rename = "ThrottleSeconds")] pub throttle_seconds: i32, #[serde(rename = "Er...
use crate::messages::protocol_version::ProtocolVersion; use crate::messages::vendor_id::VendorId; use crate::messages::submessages::submessages::EntitySubmessage; use crate::messages::submessages::submessages::*; use crate::structure::guid::{GuidPrefix, GUID}; use crate::structure::entity::RTPSEntity; use crate::struct...
extern crate clap; extern crate fnv; extern crate gfx_chain; extern crate gfx_hal as hal; extern crate rand; use clap::{App, Arg, SubCommand}; use fnv::FnvHashMap; use gfx_chain::chain::Chain; use gfx_chain::collect::{collect, Chains}; use gfx_chain::pass::{Pass, PassId, StateUsage}; use gfx_chain::resource::{Buffer, ...
// Copyright 2021 Protocol Labs. // // 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, di...
use std::fs::File; use std::io::Read; use std::path::Path; use std::str::FromStr; use utils::*; use obj::*; use xml::Element; use xml::Xml::CharacterNode; use vecmath; use xml; use {Animation, BindDataSet, BindData, Skeleton, Joint, VertexWeight, JointIndex, ROOT_JOINT_PARENT_INDEX}; macro_rules! try_some { ($e:...
use std::cmp::Ordering; use std::hash::{Hash, Hasher}; #[rustfmt::skip] #[derive(Clone, Copy,Debug)] /// Type that contains the kind of a chemical element. pub enum Element { H, He, Li, Be, ...
use {Error, FakeDebug, atom_syndication, futures, lettre, reqwest, rss, serde_json, std}; use chrono::{DateTime, Utc}; use config::Config; use escapade::Escapable; use log::{LogKind, LogLevel, Logger}; use std::collections::{HashMap, HashSet}; use std::io::Write; use std::path::{Path, PathBuf}; use std::str::FromStr; u...
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this f...
//! Provides functions for assembling SAILAR modules given an abstract syntax tree. use crate::ast; use crate::parser; use sailar::binary; use sailar::binary::instruction::{self, Instruction}; use sailar::binary::record; use sailar::binary::Builder; use sailar::versioning; use std::borrow::Cow; use std::collections::h...
// Copyright 2017-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 wr...
extern crate console; #[macro_use] extern crate clap; extern crate domain; extern crate pretty_env_logger; extern crate http; extern crate futures; #[macro_use] extern crate log; extern crate prost; #[macro_use] extern crate prost_derive; extern crate tokio_core; extern crate rustls; extern crate tower_http; extern cr...
#![recursion_limit = "128"] #![allow(unused_imports, unused_assignments, unused_mut)] extern crate proc_macro; extern crate proc_macro2; #[macro_use] extern crate quote; #[macro_use] extern crate syn; #[macro_use] extern crate lazy_static; extern crate serde; #[macro_use] extern crate serde_derive; #[macro_use] extern...
use std::char; use std::collections::LinkedList; use crate::common::*; /* token stuff */ #[allow(non_camel_case_types)] #[derive(Clone, Debug, PartialEq)] pub enum TokenType { TK_NEWLN = -2, TK_EOF = -1, /* immedial primitive */ TK_IDENTIFIER = 0, TK_NUMBER, TK_STRING, /* keywords */ TK_BREAK, TK_CASE, ...
//! Module providing a transformation from a textual source code to a serie of tokens. //! //! Directly inspired by the great work on the RustPython team //! https://github.com/RustPython/RustPython/blob/master/parser/src/lexer.rs use crate::compiler::position::{spanned, BytePos, Position, Spanned}; use log::trace; //...
#![allow(unused_imports)] use std::cmp::Reverse; use std::collections::{HashMap, HashSet}; use std::convert::TryInto; use std::fmt::Display; use std::path::PathBuf; use std::sync::atomic::{AtomicU64, Ordering}; use std::hash::Hash; use std::io::Write; use chashmap::CHashMap; use clap::Clap; use indicatif::{ParallelPro...
use std::collections::HashMap; use std::ops::Deref; extern crate rand; #[cfg(feature = "no-wasm")] extern crate rand_chacha; #[cfg(feature = "no-wasm")] use rand::{Rng, SeedableRng}; // use bitvec::prelude::*; pub mod morton; pub mod node; pub mod rect; use super::universe::node::{BitSpace, BitSpaceSlice, Node, N...
use std::{ cmp::Reverse, collections::{BinaryHeap, HashMap, HashSet}, sync::Arc, }; use itertools::Itertools; use maplit::hashset; use ruma_common::MilliSecondsSinceUnixEpoch; use ruma_events::{ room::{ member::{MemberEventContent, MembershipState}, power_levels::PowerLevelsEventContent...
//! Definition of the Canvas struct //! use std::f64; use failure::Error; use cairo::{Context, FontSlant, FontWeight}; use palette::Srgba; use {axis, chart, color, coord, label, mark, shape}; use utils::{Drawable, Plottable}; /// ## Canvas /// /// This is the area of the plot where the data is actually displayed, a...
/* origin: FreeBSD /usr/src/lib/msun/src/e_lgamma_r.c */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is f...
// 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 // di...
use crate::prelude::tz::*; use chrono::offset::{Offset, TimeZone}; use chrono::{Datelike, FixedOffset, NaiveDate}; use chrono_tz::America::*; use std::str::FromStr; use strum_macros::EnumString; #[derive(Debug, EnumString, Clone)] #[non_exhaustive] pub enum America { #[strum(disabled = "true")] Argentina(Argent...
use std::{io::{Read, Write}, path::{Path, PathBuf}, time::Duration}; use std::collections::{HashMap, BTreeSet}; use std::thread; use std::sync::mpsc; use std::time::Instant; use event::KeyEvent; use thiserror::Error; use memmap::MmapOptions; use rewind_core::{fuzz, mem::X64VirtualAddressSpace, mutation, s...
/* This is dvipdfmx, an eXtended version of dvipdfm by <NAME>. Copyright (C) 2002-2016 by <NAME> and <NAME>, the dvipdfmx project team. Copyright (C) 1998, 1999 by <NAME> <<EMAIL>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
use std::fmt; use std::fmt::{Debug, Formatter}; use log::*; use hram::Hram; use crate::gb_emu::GameBoyModel; use crate::hardware::apu::{APU, APU_MEM_END, APU_MEM_START, WAVE_SAMPLE_END, WAVE_SAMPLE_START}; use crate::hardware::cartridge::Cartridge; use crate::hardware::mmu::cgb_mem::{CgbSpeedData, HdmaRegister}; use...
#![no_std] #![no_main] #![feature(const_fn)] #![cfg_attr(feature = "bench", feature(test))] #[allow(unused_imports)] use cortex_m::{asm, singleton}; use core::{ panic::PanicInfo, sync::atomic::{self, Ordering}, }; use cortex_m::{ interrupt, peripheral::Peripherals as CorePeripherals, }; // For ln us...
#![cfg_attr(not(feature = "std"), no_std)] //! A crate for the Marlin preprocessing zkSNARK for R1CS. //! //! # Note //! //! Currently, Marlin only supports R1CS instances where the number of inputs //! is the same as the number of constraints (i.e., where the constraint //! matrices are square). Furthermore, Marlin o...
use std::collections::{HashMap, VecDeque}; use std::fmt; use std::iter; use std::net::SocketAddr; use std::ops::{Index, IndexMut}; use std::sync::Arc; use std::time::{Duration, Instant, SystemTime}; use bytes::{BufMut, BytesMut}; use err_derive::Error; use rand::{rngs::StdRng, Rng, RngCore, SeedableRng}; use slab::Sla...
#![feature(rustc_private, plugin_registrar, quote, plugin)] #![plugin(matches)] extern crate syntax; extern crate rustc; #[no_link] #[macro_use] extern crate matches; use syntax::codemap::*; use syntax::parse::*; use syntax::parse::token::{Token, IdentStyle}; use syntax::abi::Abi; use syntax::ast_util::empty_generics;...
// 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 // found in the THIRD-PARTY file. use libc; use net_gen...
/* 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 writing, software distribu...
#[cfg(feature = "verbose-errors")] #[cfg(feature = "std")] use internal::{Err, IResult}; #[cfg(feature = "verbose-errors")] use verbose_errors::Context; #[cfg(feature = "std")] use std::collections::HashMap; #[cfg(feature = "alloc")] use lib::std::string::ToString; #[cfg(feature = "alloc")] use lib::std::vec::Vec; #...
//! `tesserae` is a library for manipulating and drawing graphics consisting of //! 8x8 pixel two-color tiles, in the spirit of text mode drawing in early 8-bit //! computers, using SDL. //! //! It includes file formats for saving and loading tile sets and graphics, //! as well as a number of built-in tile sets. //! ...
/* * jpeg/header.rs Mith@mmk (C) 2022 * use MIT License */ type Error = Box<dyn std::error::Error>; use bin_rs::io::*; use bin_rs::reader::BytesReader; use bin_rs::reader::BinaryReader; use crate::error::ImgError; use crate::error::ImgErrorKind; use crate::tiff::header::*; // for exif /* from SOS */ pub struct Huf...
#![recursion_limit = "512"] #![cfg_attr(feature = "unstable", feature(core_intrinsics))] #![cfg_attr(feature = "unstable", feature(test))] #![cfg_attr(feature = "unstable", feature(write_all_vectored))] #[macro_use] pub mod common; pub mod arena; pub mod ast; pub mod builtins; pub mod bytecode; pub mod cfg; #[macro_us...
// 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::{borrow::Cow...
use windows::{ core::*, Win32::Foundation::*, Win32::Graphics::Direct3D::Fxc::*, Win32::Graphics::Direct3D::*, Win32::Graphics::Direct3D12::*, Win32::Graphics::Dxgi::Common::*, Win32::Graphics::Dxgi::*, Win32::System::LibraryLoader::*, Win32::System::Threading::*, Win32::System::WindowsProgramming::*, W...
mod boxing; mod code_gen_context; mod gen_exprs; mod lambda; mod utils; use crate::code_gen::code_gen_context::*; use crate::code_gen::utils::llvm_vtable_name; use crate::error; use crate::error::Error; use crate::hir::*; use crate::mir; use crate::mir::*; use crate::names::*; use crate::ty::*; use either::*; use inkwe...
//! Decimal 128 bits are broken down like so: //! [1bits] [ 14bits ] [ 113 bits ] //! sign exponent significand //! field use bitvec::{bitvec, BigEndian, BitVec}; use byteorder::*; use std::cmp::Ordering; use std::fmt; use std::io::Cursor; use std::str::FromStr; #[derive(Clone, P...
use bus::{Addressable, OAM_START, OAM_END, VIDEO_RAM_START, VIDEO_RAM_END}; use enum_primitive::FromPrimitive; use log::{error, warn}; pub const SCREEN_WIDTH: usize = 160; pub const SCREEN_HEIGHT: usize = 144; const ADDR_LCDC: u16 = 0xFF40; const ADDR_STAT: u16 = 0xFF41; const ADDR_SCY: u16 = 0xFF42; const ADDR_SCX:...
// Copyright (c) 2021 <NAME> <<EMAIL>>. All rights reserved. // Use of this source is governed by Apache-2.0 License that can be found // in the LICENSE file. //! From sys/sys/socket.h use crate::{sa_family_t, socklen_t, ssize_t}; /// stream socket pub const SOCK_STREAM: i32 = 1; /// datagram socket pub const SOCK_D...
/* Copyright (c) 2019 <NAME> <<EMAIL>> 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...
//! Evaluation errors. pub use arithmetic_parser::UnsupportedType; use derive_more::Display; use hashbrown::HashSet; use core::fmt; use crate::{ alloc::{format, vec, Box, String, ToOwned, ToString, Vec}, fns::FromValueError, ModuleId, Value, }; use arithmetic_parser::{ BinaryOp, CodeFragment, Locate...
use crate::cli; use crate::network; use crate::settings; use crate::video::types::VideoSourceType; use log::*; use simple_error::SimpleError; use url::Url; use std::convert::TryInto; use std::str::FromStr; use std::sync::{Arc, Mutex}; lazy_static! { static ref ID_CONTROL: Arc<Mutex<Vec<u8>>> = Arc::new(Mutex::ne...
use std::{fmt, mem, ptr, slice}; use std::cmp::Ordering; use std::collections::BTreeMap; use std::collections::HashSet; use std::ffi::CString; use std::marker::PhantomData; use std::hash::{Hash, Hasher}; use std::os::raw::{c_char, c_void}; use regex::Regex; use symbolic_common::{Arch, ByteView, CpuFamily, ErrorKind, ...
//! Lexical analysis for .clif files. use crate::error::Location; use cranelift_codegen::ir::types; use cranelift_codegen::ir::{Ebb, Value}; #[allow(unused_imports, deprecated)] use std::ascii::AsciiExt; use std::str::CharIndices; use std::u16; /// A Token returned from the `Lexer`. /// /// Some variants may contains...
use coverm::bam_generator::*; use estimation::bams::{contig_coverage::*, index_bams::*}; use estimation::variant_matrix::*; use std; use utils::*; use crate::*; use coverm::mosdepth_genome_coverage_estimators::*; use coverm::FlagFilter; use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; use scoped_threadpool:...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - configures clock source and clock output pins"] pub pin_ctrl: PIN_CTRL, #[doc = "0x04 - configures IO_MUX for GPIO0"] pub gpio0: GPIO0, #[doc = "0x08 - configures IO_MUX for GPIO1"] pub gpio1: GPIO1, #[doc = "0x...
//! Implements the ntor v3 key exchange, as described in proposal 332. //! //! The main difference between the ntor v3r handshake and the //! original ntor handshake is that this this one allows each party to //! encrypt data (without forward secrecy) after it sends the first //! message. // TODO: // Wrap this in a...
// Copyright 2021-2022 <NAME> // // 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 to those ...
use crate::{script, Tag, Face, GlyphInfo, Mask, Script}; use crate::buffer::{Buffer, BufferScratchFlags}; use crate::ot::{feature, FeatureFlags}; use crate::plan::{ShapePlan, ShapePlanner}; use crate::unicode::{CharExt, GeneralCategory, GeneralCategoryExt, modified_combining_class, hb_gc}; use super::*; pub const ARA...
//! The peer module holds everything that deals with managing a remote connection over which //! actor messages can be sent and received. // use crate :: { import::*, * }; mod call ; mod call_response ; mod close_connection ; mod connection_error ; mod in_call ; mo...
//! The Veracruz client's library //! //! ## Authors //! //! The Veracruz Development Team. //! //! ## Licensing and copyright notice //! //! See the `LICENSE_MIT.markdown` file in the Veracruz root directory for //! information on licensing and copyright. use crate::error::VeracruzClientError; use log::{error, info};...
//! Session management for the Discv5 Discovery service. //! //! The [`SessionService`] is responsible for establishing and maintaining sessions with //! connected/discovered nodes. Each node, identified by it's [`NodeId`] is associated with a //! [`Session`]. This service drives the handshakes for establishing the ses...
use crate::parser::{ expr::LiteralExpr, statement::{ClassProperty, ForOfLoop}, }; use super::{ consteval::Eval, expr::{Expr, UnaryExpr}, lexer::{self, Lexer}, statement::{ BlockStatement, Catch, Class, ClassMember, ClassMemberKind, ExportKind, ForLoop, FunctionDeclaration, Funct...
use super::domain_name::*; use crate::types::*; use std::collections::HashMap; use std::net::{Ipv4Addr, Ipv6Addr}; /// Parse character string from buf pub fn parse_character_string( buf: &Vec<u8>, start: usize, limit: usize, ) -> Result<(String, usize), String> { if start >= buf.len() { return ...
//! API for working with conditions. //! //! Conditions are arena-allocated. Only freely-copyable references are exposed //! through this API. This allows them to be manipulated without worrying about //! ownership. //! //! # Example //! ```rust //! # use radeco_lib::backend::ctrl_flow_struct::condition::*; //! // setu...
//! The identifier octets of a BER encoded value. //! //! This is a private module. Its public items are re-exported by the parent. use std::{fmt, io}; use crate::decode; //------------ Tag ----------------------------------------------------------- /// The tag of a BER encoded value. /// /// Each BER encoded value...
// 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...
//! Types. //! //! Probably the single most important file in this crate. Lots of types used pervasively across //! this crate are defined here. use crate::fmt_util::{comma_seq, ty_var_name}; use drop_bomb::DropBomb; use fast_hash::{FxHashMap, FxHashSet}; use std::collections::BTreeMap; use std::fmt; use std::rc::Rc; ...
macro_rules! spawn_blocking_and_await { ($blocking_call:expr) => {{ #[cfg(feature = "tokio-runtime")] { tokio::task::spawn_blocking(move || $blocking_call) .await .unwrap() } #[cfg(feature = "async-std-runtime")] { asyn...
#![allow(rustdoc::bare_urls)] #![doc = include_str!("../../docs/profile/README.md")] use std::env; use std::fs; use std::path::PathBuf; use anyhow::{bail, Context}; use async_std::{prelude::*, process}; use cargo_metadata::Artifact; use chrono::Local; use crossbeam_channel as channel; use futures::executor::block_on;...
// 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...
extern crate rand; use std::fmt; use std::any::Any; use std::collections::HashMap; use std::sync::{Arc, RwLock}; use rand::Rng; use rand::seq::SliceRandom; use uuid::Uuid; use super::{ layertype::LayerType, layer::Layer, vectorops }; use super::super::{ id::*, neuron::*, edge::*, tracer::...
/* * Copyright (C) 2020 Swift Navigation Inc. * Contact: Swift Navigation <<EMAIL>> * * This source is subject to the license found in the file 'LICENSE' which must * be be distributed together with this source. All other rights reserved. * * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY ...
// Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // 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 ...
#![no_std] #![no_main] extern crate embedded_mp3 as mp3; use panic_itm as _; #[macro_use(block)] extern crate nb; mod battery_voltage; mod buttons; mod cycles_computer; mod data_reader; mod hex; mod mp3_player; mod pause_point; mod playlist; mod sleep_manager; mod sound_device; mod state; use buttons::{ButtonKind, ...
use crate::emulator::{Opcode, SubCommand}; use std::num::ParseIntError; use std::fmt::Write; use std::collections::HashMap; const MAX_ADDRESS: u32 = 2u32.pow(15) - 1; #[derive(Clone,Eq,PartialEq,Debug)] enum AsmArgument<'a>{ Number(&'a str,Result<i32,ParseIntError>), //#1234, #-1234 Label(&'a str), //@label ...
extern crate chrono; extern crate glob; use comrak::{markdown_to_html, ComrakOptions}; use glob::glob; use chrono::{DateTime, Utc, Timelike}; use std::fs; use std::path::Path; use std::collections::{ HashMap, HashSet }; use array2d::Array2D; use std::iter::FromIterator; use jsonwebtoken::{ encode, Algorithm, Header...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
use super::Scene; use crate::canvas::*; use crate::CLI_OPTS; use fxhash::{FxHashMap, FxHashSet}; use libremarkable::image; use libremarkable::input::{gpio, multitouch, multitouch::Finger, InputEvent}; use pleco::bot_prelude::*; use pleco::{BitMove, Board, File, Piece, Rank, SQ}; use std::sync::mpsc::{channel, Receiver,...
use std::rc::Rc; use std::collections::{HashMap}; use parser::tokenizer::{Tokenizer, Parser}; use parser::rule_parser::RuleParser; use core::base_types::*; use core::templates::*; use core::matcher::*; pub struct TestTheory { pub t_exists: Rc<dyn TquTemplate>, pub t_so_forall: Rc<dyn TquTemplate>, quas...
use std::io; use std::fmt; use std::panic::resume_unwind; use std::collections::HashMap; use rand::seq::SliceRandom; use std::collections::HashSet; use std::time::{Duration, Instant}; use rand::rngs::ThreadRng; use std::arch::x86_64::_mm_sha1rnds4_epu32; use rand::Rng; macro_rules! parse_input { ($x:expr, $t:iden...
use std::borrow::{Cow, Borrow}; use std::error; use std::fmt; use std::mem; use std::ops::Range; use std::str; use xmlparser::{ self, Reference, Stream, StrSpan, TextPos, }; use { NS_XML_URI, NS_XMLNS_URI, Attribute, Document, ExpandedNameOwned, Namespaces, Node, No...
use crate::{ db::Database, instructions::gas, machine, machine::{Contract, Gas, Machine}, models::SelfDestructResult, return_ok, spec::{Spec, SpecId::*}, subroutine::{Account, State, SubRoutine}, util, CallContext, CreateScheme, Env, Inspector, Log, Return, TransactOut, TransactTo, ...
// Don't create a new standard console window when launched from the windows GUI. #![windows_subsystem = "windows"] use failure::{err_msg, format_err, Error, Fallible}; use promise::Future; use std::ffi::OsString; use std::fs::DirBuilder; use std::io::{Read, Write}; #[cfg(unix)] use std::os::unix::fs::DirBuilderExt; u...
use std::collections::HashSet; use futures::future::{BoxFuture, FutureExt}; use mown::Mown; use iref::Iri; use json::JsonValue; use crate::{ Error, ErrorCode, ProcessingMode, LangString, Id, Reference, Lenient, Indexed, object::*, context::{ ContextMut, Local, ProcessingStack, Loader }, syntax::{ ...
// Copyright 2021 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 fuchsia_zircon::{self as zx, sys::zx_thread_state_general_regs_t, AsHandleRef, HandleBased}; use process_builder::{elf_load, elf_parse}; use std::ffi::...
// `error_chain!` can recurse deeply. #![recursion_limit = "1024"] // TODO: get contigs from FAI file use std::collections::HashMap; use std::collections::HashSet; use std::env; use std::fs::File; use std::mem; use std::result; use std::sync::atomic::Ordering; use std::sync::{atomic, Arc}; extern crate bio; use bio:...
use crate::traits::{BasicInt, DecimalStorage}; use crate::{ParseDecimalError, Rounding}; // Code used to generate lookup table. // #[test] // fn generate() { // println!(" 1,"); // let mut min: crate::u256_impl::u256 = 1.into(); // for _ in 0..256 { // let next = min << 1; // let digits ...
// Copyright 2018 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. // Package deviceid generates device IDs. // DeviceID generates the device ID from a MAC address. // // This is used for mDNS, and the device ID for the f...
// Copyright 2019. 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...
//! Type-checking for the rust-intrinsic and platform-intrinsic //! intrinsics that the compiler exposes. use crate::errors::{ SimdShuffleMissingLength, UnrecognizedAtomicOperation, UnrecognizedIntrinsicFunction, WrongNumberOfTypeArgumentsToInstrinsic, }; use crate::require_same_types; use rustc_errors::struc...
// Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0. use std::pin::Pin; use std::sync::atomic::AtomicU64; use std::sync::Arc; use std::sync::RwLock; use std::thread; use std::time::Duration; use futures::channel::mpsc::UnboundedSender; use futures::compat::Future01CompatExt; use futures::executor::block...
#![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(improper_ctypes)] #![allow(dead_code)] extern crate libc; use ::std::default::Default; #[cfg(target_pointer_width = "32")] pub type SQInteger = ::libc::int32_t; #[cfg(target_pointer_width = "32")] pub type SQUnsignedInteger = ::libc::uint32_t; #[cf...
use crate::packet::TCPPacket; use crate::socket::{SockID, Socket, TcpStatus}; use crate::tcpflags; use anyhow::{Context, Result}; use pnet::packet::{ip::IpNextHeaderProtocols, tcp::TcpPacket, Packet}; use pnet::transport::{self, TransportChannelType}; use rand::{rngs::ThreadRng, Rng}; use std::collections::HashMap; use...
use crate::{guild::*, server::Label, UserState}; use felyne_trace::{traces::FelyneTraceV2, *}; use serenity::{client::Context, model::prelude::UserId}; use songbird::{ model::payload::Speaking, packet::{ demux::{self, DemuxedMut}, rtcp::{report::*, MutableRtcpPacket, Rtcp}, rtp::{Rtp, RtpExtensionPacket}, Mut...
use super::pbrt::{Float, Spectrum, consts::{PI, INV_4_PI}}; use super::profiler::Profiler; use super::interaction::{Interaction, SurfaceInteraction, SimpleInteraction}; use super::geometry::{Vector3f, Point2f, Normal3f, dot_vec_normal}; use super::scene::Scene; use super::material::{Material, TransportMode}; use super:...
pub use heapless::{consts, ArrayLength, String, Vec}; pub use heapless_bytes::Bytes; use serde::{Deserialize, Serialize}; use serde_indexed::{DeserializeIndexed, SerializeIndexed}; use crate::{ constants::{ ATTESTED_CREDENTIAL_DATA_LENGTH, // ATTESTED_CREDENTIAL_DATA_LENGTH_BYTES, AUTHENTIC...
//! Types shared by user and kernel #![no_std] // This feature is needed to reexport syscall definitions in the standard library. #![cfg_attr(feature = "rustc-dep-of-std", feature(staged_api))] #![recursion_limit="128"] // rustc warnings #![warn(unused)] #![warn(missing_debug_implementations)] #![allow(unused_unsafe)...
// Copyright 2020-2021, The Tremor Team // // 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 agr...
//! ## Integration Tests: Overview //! This file implements an integration test system for hashdeep-compare. //! //! *run_test* function calls define the tests: each one invokes a separate execution of //! the program and records its results. //! //! Normally, the program is tested as a separate binary. The **integrati...
extern crate web_sys; use std::fmt; mod utils; use rand::seq::SliceRandom; use rand::thread_rng; use wasm_bindgen::prelude::*; // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global // allocator. #[cfg(feature = "wee_alloc")] #[global_allocator] static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAll...
extern crate rand; use std::fmt; use rand::{Rand, Rng, StdRng}; pub struct Platform { pub print_xy: fn(i32, i32, &str), pub print_xy_offset: fn(i32, i32, i32, i32, &str), pub clear: fn(Option<Rect>), pub size: fn() -> Size, pub pick: fn(Point, i32) -> char, pub mouse_position: fn() -> Point, ...
use super::error::{Error, Result}; use libloading::{Library, Symbol}; use once_cell::unsync::OnceCell; use regex::{Regex, RegexBuilder}; use serde_derive::Deserialize; use std::collections::HashMap; use std::io::BufReader; use std::ops::Range; use std::path::{Path, PathBuf}; use std::process::Command; use std::sync::Mu...
// Shader AST typedefs pub use shader_ast::*; pub use crate::cx::*; pub use crate::math::*; pub use crate::colors::*; #[derive(Default, Clone, PartialEq)] pub struct Shader { pub shader_id: Option<usize> } #[derive(Default, Clone)] pub struct RectInstanceProps { pub x: Option<usize>, pub y: Option<usize...
// 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 crate::{ async_quic::{AsyncConnection, AsyncQuicStreamReader, AsyncQuicStreamWriter, StreamProperties}, coding::{decode_fidl, encode_fidl}, ...
//! Computation of basic block order in emitted code. //! //! This module handles the translation from CLIF BBs to VCode BBs. //! //! The basic idea is that we compute a sequence of "lowered blocks" that //! correspond to one or more blocks in the graph: (CLIF CFG) `union` (implicit //! block on *every* edge). Conceptu...
use fnv::FnvHashMap; use libc::size_t; use num_bigint::*; use num_complex::Complex; use std::{ cmp::Ordering, collections::VecDeque, fmt::Debug, iter::FromIterator, mem, ops::{ Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, Div, DivAssign, Mul, MulAssign, Neg, Rem, Rem...