text
stringlengths
7.05k
33.9k
use crate::debugger::Breakpoint; use crate::dwarf_data; use nix::sys::ptrace; use nix::sys::signal; use nix::sys::wait::{waitpid, WaitPidFlag, WaitStatus}; use nix::unistd::Pid; use std::collections::HashMap; use std::mem::size_of; use std::os::unix::process::CommandExt; use std::process::{Child, Command}; pub enum St...
//! Configuring the system clock sources. //! You will typically need to create an instance of `GenericClockController` //! before you can set up most of the peripherals on the atsamc21 device. //! The other types in this module are used to enforce at compile time //! that the peripherals have been correctly configured...
// Copyright Materialize, Inc. All rights reserved. // // Use of this software is governed by the Business Source License // included in the LICENSE file. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License...
// Copyright 2017 Mozilla // // 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...
use crate::error::{Result, SQLRiteError}; use crate::sql::parser::create::CreateQuery; use serde::{Deserialize, Serialize}; use std::cell::RefCell; use std::collections::{BTreeMap, HashMap}; use std::fmt; use std::rc::Rc; use prettytable::{Cell as PrintCell, Row as PrintRow, Table as PrintTable}; /// SQLRite data typ...
pub const IA32_FEATURE_CONTROL: u32 = 0x3A; pub const IA32_VMX_BASIC: u32 = 0x480; pub const IA32_VMX_PINBASED_CTLS: u32 = 0x481; pub const IA32_VMX_PROCBASED_CTLS: u32 = 0x482; pub const IA32_VMX_EXIT_CTLS: u32 = 0x483; pub const IA32_VMX_ENTRY_CTLS: u32 = 0x484; pub const IA32_VMX_PROCBASED_CTLS2: u32 = 0x48B; pub c...
//! Derive standardized scancodes based on per platform definitions. //! //! Linux definitions: https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h //! Windows definitions: https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc //! Macos definiti...
//! General Purpose Input / Output //! //! This module provides common GPIO definitions that are available on all STM32L4x6 packages. By //! enabling features, you can use definitions for specific chips which may include additional //! GPIO lines. In that case, you will probably not want to `use` this module directly, ...
use array_macro::array; use alloc::string::String; use alloc::boxed::Box; use alloc::sync::Arc; use core::convert::TryInto; use core::fmt::Display; use core::mem; use crate::consts::{MAXPATH, MAXARG, MAXARGLEN, fs::MAX_DIR_SIZE}; use crate::process::PROC_MANAGER; use crate::fs::{ICACHE, Inode, InodeType, LOG, File, P...
// Copyright (c) 2020 Huawei Technologies Co.,Ltd. All rights reserved. // // StratoVirt is licensed under Mulan PSL v2. // You can use this software according to the terms and conditions of the Mulan // PSL v2. // You may obtain a copy of Mulan PSL v2 at: // http://license.coscl.org.cn/MulanPSL2 // THIS SOFTWA...
extern crate queues; extern crate rand; use ggez; use ggez::event::{KeyCode, KeyMods}; use ggez::graphics; use ggez::nalgebra::{Point2, Vector2}; use ggez::timer; use ggez::{event, Context, GameResult}; use std::env; use std::path; use std::time::{Duration, Instant}; use queues::*; use rand::Rng; //30x30 grid, not ...
use num::FromPrimitive; pub type Xi32 = i32; pub type Yi32 = i32; pub type Xu32 = u32; pub type Yu32 = u32; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Event { KeyInput(PressState, VKeyCode), MButtonInput(ClickType, MButton), /// Triggered when the mouse moves MouseMoved(Xi32, Yi32), //...
//! Read and write the variable length [LEB128](https://en.wikipedia.org/wiki/LEB128) number format. //! //! LEB128 ("Little Endian Base 128") is used, for example in [DWARF debugging information](http://dwarfstd.org/doc/dwarf-2.0.0.pdf) //! (see Appenix 4 for C pseudo code) and in the [WebAssembly binary format](https...
use proc_macro::TokenStream; use proc_macro2::{Span, TokenStream as TS2}; use quote::quote; use syn::{ parse_macro_input, punctuated::Punctuated, token::{Colon2, Comma}, Attribute, Data, DeriveInput, Error, Fields, GenericArgument, Ident, LitStr, Meta, MetaList, MetaNameValue, NestedMeta, Path, Path...
use std; use gfx; use gfx_gl; use gfx_glutin; use glutin; use nes::{ErrorInfo,ErrorInfoTrait}; use reactor; use types::*; use consts::*; use gfx::Device; use glutin::GlContext; use glutin::EventsLoop; use std::thread; use std::thread::JoinHandle; use supervisor; use supervisor::SupervisorSender; use supervisor::Sup...
use serenity::{ prelude::*, builder::CreateEmbed, framework::standard::{ StandardFramework, }, }; use serde_json::Value; use serde_json; use reqwest::header; use reqwest; use itertools::Itertools; use rand::{thread_rng, seq::SliceRandom}; use typemap::Key; use std::marker; use failure::Error; us...
//! A [`Client`] defines the algorithm for parsing an ASCII packet, but does not //! define any particular output. The output type is defined by a separate //! [`Visitor`] types. In this way the parsing algorithm is only defined once //! but multiple output types can be defined with minimal work. //! //! The [`Client`]...
// Copyright 2021 <NAME> and the rust-fuse 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 applic...
use crate::{ body::{Body, BodyHandle}, contact::Contact, gjk::{gjk_closest_points, gjk_does_intersect}, shapes::Shape, }; use glam::Vec3; use std::borrow::Borrow; pub fn sphere_sphere_static( radius_a: f32, radius_b: f32, pos_a: Vec3, pos_b: Vec3, ) -> Option<(Vec3, Vec3)> { let ab ...
use crate::{ContractRunner, SuiteResult, TestFilter}; use ethers::{ abi::Abi, prelude::{artifacts::CompactContractBytecode, ArtifactId, ArtifactOutput}, solc::{Artifact, ProjectCompileOutput}, types::{Address, Bytes, U256}, }; use eyre::Result; use foundry_evm::executor::{ builder::Backend, opts::Ev...
// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MI...
use rg3d::{ core::{ algebra::{Isometry3, Matrix4, Point3, Translation, Translation3, Vector3}, color::Color, math::aabb::AxisAlignedBoundingBox, pool::{ErasedHandle, Handle, Pool}, uuid::Uuid, BiDirHashMap, }, physics3d::{ desc::{ ColliderD...
// * This file is part of the uutils coreutils package. // * // * (c) <NAME> <<EMAIL>> // * // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. // spell-checker:ignore (clap) dont // spell-checker:ignore (ToDO) formatteriteminfo input...
// // This file contains common utilities for dealing with PostgreSQL WAL files and // LSNs. // // Many of these functions have been copied from PostgreSQL, and rewritten in // Rust. That's why they don't follow the usual Rust naming conventions, they // have been named the same as the corresponding PostgreSQL function...
use crate::smgr::types::*; use crate::smgr_presence::types::XmlPsCommProfile; use yaserde::ser::to_string; #[macro_use] extern crate log; extern crate xml; extern crate yaserde; #[macro_use] extern crate yaserde_derive; mod smgr; mod smgr_agent; mod smgr_officelinx; mod smgr_presence; mod smgr_sm; mod smgr_station; ...
// Copyright 2020 ZomboDB, LLC <<EMAIL>>. All rights reserved. Use of this source code is // governed by the MIT license that can be found in the LICENSE file. //! Safely create Postgres Background Workers, including with full SPI support //! //! See: [https://www.postgresql.org/docs/12/bgworker.html](https://www.post...
use super::display_token::{DisplayToken, RecTok}; use super::size::Size; use super::Ast; /// An enum to hold the different ways that a JSON AST can be formatted #[derive(Eq, PartialEq, Copy, Clone)] pub enum JSONFormat { /// The most compact representation, has minimal whitespace. /// E.g. `[{"foo": true, "bar...
use std::collections::{HashMap, VecDeque}; use std::sync::atomic::AtomicU32; use std::sync::mpsc::{self, Receiver, Sender}; use std::thread::{self, JoinHandle}; use std::time::Duration; use dbus::{ self, MessageType, arg::{self, PropMap, RefArg}, blocking::{Connection, stdintf::org_freedesktop_dbus::Re...
// 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...
// 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 chrono::{Datelike, TimeZone, Timelike}; use fidl::endpoints::{create_endpoints, ServerEnd}; use fidl_fuchsia_cobalt::{CobaltEvent, LoggerFactoryMarker}...
// Copyright 2019-2022 ChainSafe Systems // SPDX-License-Identifier: Apache-2.0, MIT mod errors; mod network; mod payload; mod protocol; pub use self::errors::Error; pub use self::network::Network; pub use self::payload::{BLSPublicKey, Payload}; pub use self::protocol::Protocol; use data_encoding::Encoding; #[allow(u...
use crate::{ kernel_abi::SupportedArch, log::LogLevel::LogDebug, registers::Registers, remote_code_ptr::RemoteCodePtr, remote_ptr::{RemotePtr, Void}, session::{ address_space::{BreakpointType, DebugStatus, WatchConfig}, task::{ task_inner::{ResumeRequest, TicksRequest...
use std::{ cell::RefCell, fmt, mem, str, sync::atomic::{self, AtomicUsize, Ordering}, }; use crate::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use owning_ref::OwningHandle; use std::collections::HashSet; pub(crate) use tracing_core::span::{Attributes, Current, Id, Record}; use tracing_core::{dispa...
use std::str::FromStr; use thoth_api::model::contribution::Contribution; use thoth_api::model::contribution::ContributionType; use thoth_api::model::contributor::Contributor; use uuid::Uuid; use yew::html; use yew::prelude::*; use yew::ComponentLink; use yewtil::fetch::Fetch; use yewtil::fetch::FetchAction; use yewtil:...
// Copyright (c) 2017-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, publish, d...
use glium::{implement_vertex, uniform}; use glium::texture::{SrgbTexture2d, DepthTexture2d}; use glium::uniforms::{Sampler, MinifySamplerFilter, MagnifySamplerFilter}; use std::rc::Rc; use glium::Surface as _; use super::*; fn m4mult(a : &[[f32; 4]; 4], b : &[[f32; 4]; 4]) -> [[f32; 4]; 4] { let mut output = [[0...
use std::io::{self, Error, ErrorKind, Read, Seek, SeekFrom}; use byteorder::{LittleEndian, ReadBytesExt}; use bzip2::read::BzDecoder; use flate2::read::DeflateDecoder; use crate::decompress::crc32::Crc32Reader; const LOCAL_FILE_HEADER_SIGNATURE: u32 = 0x04034b50; const CENTRAL_FILE_HEADER_SIGNATURE: u32 = 0x02014b50...
// Copyright 2016 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
use crate::{brentq::brentq, context::Context, traits::MyReal}; use crate::{ sum_trunc_dirichlet::sum_trunc_dirichlet, traits::{ComplexFunctions, ExpPolyApprox}, }; use core::panic; use log::debug; use num::Complex; use rustfft::FftNum; use std::f64::consts::PI; type Float = f64; type Complex64 = num::Complex<F...
//! Reactive primitives for Sycamore. #![warn(missing_docs)] mod arena; mod context; mod effect; mod iter; mod memo; mod signal; pub use effect::*; pub use signal::*; use std::any::{Any, TypeId}; use std::cell::RefCell; use std::collections::HashMap; use std::marker::PhantomData; use std::mem; use std::rc::{Rc, Wea...
// 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. /// Logs an error message if the passed in `result` is an error. #[macro_export] macro_rules! log_if_err { ($result:expr, $log_prefix:expr) => { ...
//! DDValue: Generic value type stored in all differential-dataflow relations. //! //! Rationale: Differential dataflow allows the user to assign an arbitrary user-defined type to //! each collection. It relies on Rust's static dispatch mechanism to specialize its internal //! machinery for each user-defined type. Un...
// Copyright (c) 2018 <NAME> #[macro_use] extern crate clap; extern crate memmap; extern crate perplex; extern crate stderrlog; use std::collections::{HashMap, HashSet, VecDeque}; use std::fs::File; use std::str::FromStr; use clap::{App, Arg}; use memmap::Mmap; use perplex::backend::generate_parser; use perplex::glr;...
pub mod deduce_connection_parameters; mod hardware_traits; mod state; mod util; use crate::jambler::state::harvest_packets::HarvestedSubEvent; // Re-export hardware implementations for user pub use hardware_traits::nrf52840; use heapless::Vec; use hardware_traits::*; use heapless::{consts::*}; use state::IntervalTim...
//! NOTE: Inlined (and slightly modified) from <https://github.com/stainless-steel/md5> //! The [MD5] hash function. //! //! ## Security Warning //! //! The package is provided for the purposes of interoperability with protocols //! and systems that mandate the use of MD5. However, MD5 should be considered //! [cryptog...
use crate::config::{BucketIndexType, SwapPriority, DEFAULT_OUTPUT_BUFFER_SIZE}; use crate::hashes::HashableSequence; use crate::io::sequences_reader::FastaSequence; use crate::io::varint::{decode_varint, decode_varint_flags, encode_varint}; use crate::utils::compressed_read::{CompressedRead, CompressedReadIndipendent};...
//! The implementation of FUSE mount and un-mount use anyhow::Context; use log::{debug, info}; use nix::fcntl::{self, OFlag}; use nix::sys::stat::{self, Mode}; use std::fs; use std::os::unix::io::RawFd; use std::path::Path; // Linux mount flags, check the following link for details // <https://github.com/torvalds/lin...
use std::cmp::Ordering::{Equal, Greater, Less}; use std::ops::Range; /// Return `true` if the specified range can accept the given replacements words. /// Returns `false` if the replacements words are already present in the original query /// or if there is fewer replacement words than the range to replace. // // // #...
mod ec; mod fq; mod fq12; mod fq2; mod fq6; mod fr; pub use self::ec::{ G1, G1Affine, G1Compressed, G1Prepared, G1Uncompressed, G2, G2Affine, G2Compressed, G2Prepared, G2Uncompressed, }; pub use self::fq::{Fq, FqRepr, FROBENIUS_COEFF_FQ6_C1, XI_TO_Q_MINUS_1_OVER_2}; pub use self::fq12::Fq12; pub use self::fq2:...
use fluffl::{ audio::*, extras::{ audio::{music_player::*, ogg::*, *}, shapes::ShapePainter2D, text_writer::*, }, io::*, window::{event_util::*, glow, glow::*, *}, FlufflError, GlowGL, *, }; use std::{ cell::{Cell, RefCell}, rc::Rc, }; /// Audio types can get re...
// Copyright Rivtower Technologies 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
extern crate nom; use nom::branch::alt; use nom::bytes::complete::tag; use nom::combinator::map; use nom::number::complete::le_u16; use nom::number::complete::le_u8; use nom::sequence::preceded; use nom::IResult; #[derive(Copy, Clone)] struct Word(u16); fn le_word(input: &[u8]) -> IResult<&[u8], Word> { le_u16(in...
use bevy::prelude::*; use bevy::render::mesh::{Indices, VertexAttributeValues}; //use crate::objects::plane::Plane; use na::{point, Point3, Vector3}; use std::collections::HashMap; use bevy::render::pipeline::PrimitiveTopology; use bevy::render::wireframe::Wireframe; use rapier::geometry::{ColliderHandle, ColliderSet...
// Copyright (c) The cargo-guppy Contributors // SPDX-License-Identifier: MIT OR Apache-2.0 use crate::{ helpers::{read_contents, regenerate_lockfile}, output::{OutputContext, OutputOpts}, publish::publish_hakari, }; use camino::{Utf8Path, Utf8PathBuf}; use clap::Parser; use color_eyre::eyre::{bail, eyre, ...
//! CLAM-Cluster //! //! Define and implement the `Cluster` struct. use std::collections::HashMap; use std::hash::Hash; use std::hash::Hasher; use std::sync::Arc; use std::sync::RwLock; use std::sync::Weak; use bitvec::prelude::*; use rayon::prelude::*; use crate::core::Ratios; use crate::prelude::*; use crate::util...
#![no_main] #![no_std] // set the panic handler use panic_halt as _; extern crate smart_leds; extern crate ws2812_spi; use smart_leds::{brightness, colors, SmartLedsWrite, RGB8}; use ws2812_spi as ws2812; use core::convert::Infallible; use embedded_hal::digital::v2::{InputPin, OutputPin}; use generic_array::type...
// Copyright 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 agreed t...
//! The main module which contents aliases to necessary items //! to create a template and implement `update` and `view` functions. //! Also this module contains declaration of `Component` trait which used //! to create own UI-components. use callback::Callback; use futures::Future; use scheduler::{scheduler, Runnable...
use crate::cow_memory_creator::CowMemoryCreator; use crate::{ Embedder, ExecutionResult, Instance, ResumeToken, WasmExecutionInput, WasmExecutionOutput, WasmExecutionResult, WasmtimeEmbedder, }; use ic_config::embedders::{Config, EmbedderType, PersistenceType}; use ic_cow_state::{CowMemoryManager, MappedState};...
//! ```text //! pagemap, from the userspace perspective //! --------------------------------------- //! //! pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow //! userspace programs to examine the page tables and related information by //! reading files in /proc. //! //! There are four component...
//! A `Press` creates new allocations for a given `Class`. The //! allocations must be such that the `Press` can also map valid //! addresses back to their `Class`. //! //! While each class gets its own press, the latter requirement means //! that the presses must all implement compatible metadata stashing //! schemes...
//! Queue of outgoing packets. use crate::packet::{self, Packet}; use crate::{util, MAX_WINDOW_SIZE}; use std::collections::VecDeque; use std::time::{Duration, Instant}; use std::{cmp, io}; // TODO: // // * Nagle check, don't flush the last data packet if there is in-flight data // and it is too small. const FIN_...
use core::num; use std::{cell::RefCell, fs, num::ParseIntError, ops::Add, rc::Rc, str::FromStr}; fn main() { let input = fs::read_to_string("input.txt").unwrap(); let mut numbers = input.lines().map(|number| Tree::from_str(number).unwrap()); let first_number = numbers.next().unwrap(); let part1 = numb...
use crate::ast::{Ast, AstNode, BinOp, Discriminant, Env, Pattern, Program, SrcLoc, Type, Val}; use crate::error_handling::add_position_info_to_filename; use im::{vector, HashMap, Vector}; use std::convert::TryInto; use std::fmt::Write; use std::{borrow::Borrow, error}; use std::{fmt, ops::Range}; macro_rules! make_thr...
#[macro_use] extern crate clap; extern crate portaudio; use core::mem; use clap::{App, Arg, ArgMatches}; use fltk::app; use log::{debug, error, info, warn}; use portaudio as pa; use pretty_hex::*; use std::{env, thread}; use std::error::Error; use std::sync::{Arc, Mutex}; use std::sync::atomic::{AtomicBool, Ordering}...
use na::DMatrix; use na::Vector3; use serde::{Serialize, Deserialize}; use std::path::Path; use std::io::prelude::*; use std::fs::File; use crate::*; use rand::prelude::*; use vulkano::buffer::cpu_access::WriteLock; use std::f32::consts::PI; mod matusik; #[derive(Clone, Serialize, Deserialize)] pub struct BRDF {...
use std::ptr; use std::mem; use std::ffi::CStr; use std::rc::{Rc, Weak}; use std::cell::{RefCell, Cell}; use std::slice; use std::ops::{Deref, Range}; use std::os::raw::{c_int, c_long, c_ulong, c_uchar, c_char}; use std::collections::{HashMap, VecDeque}; use context::Context; use desktop::Desktop; use error::{Result, ...
use chrono::Utc; use std::{ collections::HashMap, fmt, fs::File, io::{self, stderr, stdout, BufRead, BufReader, BufWriter, Error, ErrorKind, Read, Write}, }; use crate::config::{Config, InputFile, SummaryFile}; use crate::stats::{FileStats, FileStatsType}; /// An input file that can be either a fastq ...
use std::fmt::Debug; use crate::math::prelude::*; #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct OctantId(u32); #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Voxel { Empty, Leaf, Octant(OctantId), } #[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct IdxPath(usize); impl Debu...
use crate::rv32i::*; use crate::vmem::SparseMem; use crate::mmio::MmioDevice; use crate::csr::{Csr, CsrFile}; use std::convert::{TryInto, TryFrom}; use bitvec::bitvec; use bitvec::fields::BitField; use num_enum::TryFromPrimitive; pub const X_REGISTER_COUNT: usize = 32; pub const MEMORY_SIZE: usize = 1024 * 1024; // 10...
#![allow(dead_code)] // TODO: remove use crate::*; use crate::d3d9::*; use winapi::Interface; use winapi::shared::d3d9types::*; use winapi::shared::windef::HDC; use std::ptr::{null, null_mut}; /// \[[docs.microsoft.com](https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nn-d3d9-idirect3dsurface9)\] /// (exte...
// Copyright (c) 2016 Chef Software Inc. and/or applicable 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 r...
extern crate vulkan_tutorial_rust; use vulkan_tutorial_rust::{ utility, // the mod define some fixed functions that have been learned before. utility::share, utility::debug::ValidationInfo, utility::structures::*, utility::constants::*, }; extern crate winit; extern crate ash; extern crate num; u...
//! A simple implementation of an in-memory files-sytem written in Rust using the BTreeMap //! data-structure. //! //! This code is inspired from https://github.com/bparli/bpfs and was modified to work //! with node-replication for benchmarking. use std::collections::BTreeMap; use std::ffi::OsStr; use std::iter; use ...
use std::net::SocketAddr; use std::{ collections::HashMap, convert::TryInto, fmt::Debug, future::Future, marker::PhantomData, pin::Pin, task::{Context, Poll}, time::Instant, }; use futures::{ channel::{mpsc, oneshot}, future::TryFutureExt, prelude::*, stream::FuturesUnor...
use super::{Parser, PathStyle, PrevTokenKind, TokenType}; use super::item::ParamCfg; use crate::{maybe_whole, maybe_recover_from_interpolated_ty_qpath}; use rustc_errors::{PResult, Applicability, pluralize}; use rustc_error_codes::*; use syntax::ptr::P; use syntax::ast::{self, Ty, TyKind, MutTy, BareFnTy, FunctionRet...
use rustc::mir::ConstraintCategory; use rustc::traits::query::OutlivesBound; use rustc::ty::free_region_map::FreeRegionRelations; use rustc::ty::{self, RegionVid, Ty, TyCtxt}; use rustc_data_structures::frozen::Frozen; use rustc_data_structures::transitive_relation::TransitiveRelation; use rustc_infer::infer::canonical...
// Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). #![deny(warnings)] // Enable all clippy lints except for many of the pedantic ones. It's a shame this needs to be copied and pasted across crates, but there doesn't appear to be a way to...
mod dependencies; mod version; use dependencies::install_deps; use fs_extra::{self as fsx, dir as dirx}; use pico_args::Arguments; use semver::Version; use std::{ env, error::Error, fs, io::{Read, Write}, path::{Path, PathBuf}, process::{Command, Stdio}, }; use version::bump_version; const HEL...
use crate::browser::dom::virtual_dom_bridge; use crate::browser::{ service::routing, url, util::{self, window, ClosureNew}, NextTick, Url, }; use crate::virtual_dom::{patch, El, EventHandlerManager, Mailbox, Node, Tag, View}; use builder::{ init::{Init, InitFn}, IntoAfterMount, MountPointInitIni...
#![feature(untagged_unions)] /// injectee -- this DLL will be injected into OVRServer_x64 process /// /// It will patch SSL functions in order to extract private keys use std::cell::RefCell; use std::collections::{HashSet}; use std::env; use std::mem::{size_of}; use std::ffi::{c_void, OsString}; use std::os:...
#![deny(missing_docs)] use crate::disseminated::Disseminated; use crate::incoming_message::{DisseminationMessageIn, IncomingMessage, PingRequestMessageIn}; use crate::member::{Member, MemberId}; use crate::members::Members; use crate::message::MessageType; use crate::message_decoder::decode_message; use crate::message...
extern crate gotham; extern crate http; extern crate hyper; extern crate mime; extern crate serde; #[macro_use] extern crate serde_derive; extern crate serde_json; #[macro_use] extern crate gotham_derive; extern crate clap; extern crate xml; extern crate pest; #[macro_use] extern crate pest_derive; #[macro_use] extern ...
// SPDX-License-Identifier: Apache-2.0 //! `sevctl` is a command line utility for managing the AMD Secure Encrypted Virtualization (SEV) platform. //! It currently supports the entire management API for the Naples generation of processors. //! //! # Usage //! //! ## help //! //! Every `sevctl` (sub)command comes with ...
use num::bigint::BigUint; use num::bigint::ToBigUint; use std::collections::HashMap; use std::cmp::Ordering; use std::fmt::{Debug, Formatter, Error}; use std::hash::{Hash, Hasher}; use definitions::{Definition, MemoryDefinition}; use execute::{Execute, PtraceExecute}; /// Defines dependencies #[derive(Clone)] pub str...
use clap::{App, Arg}; use rustc_demangle::demangle; use solana_rbpf::{ assembler::assemble, disassembler::{HLInsn, to_insn_vec}, ebpf, memory_region::{MemoryMapping, MemoryRegion}, user_error::UserError, vm::{Config, EbpfVm, Executable, SyscallObject, SyscallRegistry}, }; use std::{ fs::File...
use std::ops::Index; use std::fmt::{Display, Formatter}; use std::fmt; use std::iter; use tsplib::Tsp; use crate::route::Route; use crate::path::Path; #[derive(Eq, PartialEq, Clone)] pub struct SymmetricMatrix { size: usize, data: Vec<u32>, } impl SymmetricMatrix { pub fn from_size(size: usize) -> Symmetr...
//! Structs representing output of puppet backend use crate::reexports::enumset::EnumSet; use crate::theme::ColorPair; use crate::theme::Effect; use crate::Vec2; use std::ops::Index; use std::ops::IndexMut; use std::rc::Rc; use std::string::ToString; use std::{fmt, fmt::Display, fmt::Formatter}; use unicode_segmentatio...
use std::borrow::Cow; use std::collections::HashMap; use std::fmt; // TODO: Remove duplication between text format AST and binary format AST. // For example, wat::ValType and wasm::TableType has the same structure. So we can use // wasm::TableType directly in parsing WAT. type Indices<'s> = HashMap<&'s str, u32>; //...
use std::cmp::{max, min}; use std::fmt; use std::fmt::Debug; use std::marker::PhantomData; use crate::{bits, Flags, prefix}; use crate::bit_reader::BitReader; use crate::chunk_metadata::{ChunkMetadata, DecompressedChunk, PrefixMetadata}; use crate::constants::*; use crate::data_types::{NumberLike, UnsignedLike}; use c...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: <NAME> Created: 21/09/2018 Last Modified: 18/10/2019 Last Modified By: <NAME> License: MIT */ // NOTE Why did original go through the effort of using map unit lengths while using cell center instead of proper radii? use whitebox_raster::R...
use std::char; use std::cmp; use std::fmt::Debug; use std::slice; use std::u8; use unicode; // This module contains an *internal* implementation of interval sets. // // The primary invariant that interval sets guards is canonical ordering. That // is, every interval set contains an ordered sequence of intervals where...
use crate::builder::{Builder, RunConfig, ShouldRun, Step}; use crate::util::t; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::env; use std::fmt; use std::fs; use std::io::{Seek, SeekFrom}; use std::path::{Path, PathBuf}; use std::process::Command; use std::time; // Each cycle is 42 days l...
//! Command execution and sandboxing. mod process_lines_actions; mod sandbox; pub use process_lines_actions::ProcessLinesActions; pub use sandbox::*; use crate::native; use crate::workspace::Workspace; use futures_util::{ future::{self, FutureExt}, stream::{self, TryStreamExt}, }; use log::{error, info}; use...
// High level formatting functions. use std::time::{Duration, Instant}; use rustc_ast::{ast, attr::HasAttrs}; use rustc_span::symbol; pub(crate) use syntux::session::ParseSess; use crate::config::{Config, FileName}; use crate::formatting::{ comment::{CharClasses, FullCodeCharKind}, generated::is_generated_f...
// 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::syntax_definition::*; use super::scope::*; use onig::{self, Region}; use std::usize; use std::collections::{HashMap, HashSet}; use std::i32; use std::hash::BuildHasherDefault; use fnv::FnvHasher; /// Keeps the current parser state (the internal syntax interpreter stack) between lines of parsing. /// If you ...
#![no_std] mod constants; use core::time::Duration; pub use constants::{CalibrationCommand, MeterControlValue}; use constants::{ ErrorStatusMask::{self, *}, MeasurementMode, Registers::{self, *}, }; use defmt::Format; use embedded_hal::{ blocking::i2c::{Read, Write, WriteRead}, digital::v2::{Inp...
// 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 ...
//! Control flow graph calculation. use std::collections::HashMap; use std::io::{self, Write}; use std::rc::Rc; use crate::Program; use crate::ir::{Microcode, MicroEncoder}; use crate::math::{SymExpr, SymCondition, Integer, DataType, Solver}; use crate::sym::{SymState, MemoryStrategy, Event}; use crate::x86_64::{Inst...