text
stringlengths
9.08k
47.9k
use crate::cargo::{Cargo, CargoBuild, CrateType}; use crate::config::{Config, Manifest}; use crate::devices::Device; use crate::flutter::Flutter; use anyhow::Result; use clap::Parser; use std::path::{Path, PathBuf}; use xcommon::Signer; #[macro_export] macro_rules! exe { ($name:expr) => { if cfg!(target_os...
//! Documentation generation for rustbuilder. //! //! This module implements generation for all bits and pieces of documentation //! for the Rust project. This notably includes suites like the rust book, the //! nomicon, rust by example, standalone documentation, etc. //! //! Everything here is basically just a shim ar...
// Testing candidates // // After candidates have been simplified, the only match pairs that // remain are those that require some sort of test. The functions here // identify what tests are needed, perform the tests, and then filter // the candidates based on the result. use crate::build::expr::as_place::PlaceBuilder...
use std::cell::RefCell; use std::rc::Rc; use gdnative::api::{ File, GlobalConstants, ImageTexture, InputEventMouseButton, InputEventMouseMotion, VisualServer, }; use gdnative::nativescript::Export; use gdnative::nativescript::property::{EnumHint, FloatHint, RangeHint}; use gdnative::prelude::*; /// Contains conv...
//! Information parsed from an input and format description. use core::convert::{TryFrom, TryInto}; use core::num::{NonZeroU16, NonZeroU8}; use crate::error::TryFromParsed::InsufficientInformation; use crate::format_description::modifier::{WeekNumberRepr, YearRepr}; use crate::format_description::{Component, FormatIt...
//! # bhtsne //! //! `bhtsne` contains the implementations of both a parallel, exact, version of the t-SNE algorithm //! and a parallel, approximate, version leveraging the Barnes-Hut algorithm. //! //! The implementation supports custom data types and custom defined metrics. See [`tSNE`] for more //! details. //! //! ...
//! //! An in-memory layer stores recently received page versions in memory. The page versions //! are held in a BTreeMap, and there's another BTreeMap to track the size of the relation. //! use crate::layered_repository::filename::DeltaFileName; use crate::layered_repository::storage_layer::{ Layer, PageReconstruc...
// Video registers for colour math and window settings. use bitflags::bitflags; use crate::video::{ BG, render::Colour }; bitflags! { #[derive(Default)] struct WindowMaskSettings: u8 { const WINDOW_2_ENABLE_HI = bit!(7); const WINDOW_2_INVERT_HI = bit!(6); const WINDOW_1_ENABLE...
use math::vec::vec3::*; use math::mat::mat3::*; use objects::shape::*; use std::f32::{MIN, MAX}; use math::utils::{interpolate_lin, rand_path_deg}; use color::*; #[derive(Clone)] pub struct BoundingBox { pub min: Vec3, pub max: Vec3, pub created: bool, } #[derive(Clone)] pub struct Mesh { pub bbox: BoundingBox, ...
#![warn(rust_2018_idioms)] #[allow(unused_imports)] #[macro_use] extern crate log; use std::{ boxed::Box, io::{stdout, Write}, panic::{self, PanicInfo}, sync::mpsc, thread, time::{Duration, Instant}, }; use clap::*; use crossterm::{ event::{ poll, read, DisableMouseCapture, Enabl...
//! Library used to implement the cargo-sync-readme binary. // #![deny(missing_docs)] pub mod intralinks; use crate::intralinks::{FQIdentifier, IntraLinkError}; use regex::RegexBuilder; use std::{ collections::HashSet, fmt, fs::{self, read_dir, File}, io::{self, Read}, path::{Path, PathBuf}, str::FromStr...
// Copyright (c) 2014, 2015 <NAME> <<EMAIL>> // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // excep...
#![allow( clippy::cast_lossless, clippy::too_many_arguments, clippy::cognitive_complexity, clippy::redundant_closure )] //! Fast GPU cached text rendering using gfx-rs & ab_glyph. //! //! Makes use of three kinds of caching to optimise frame performance. //! //! * Caching of glyph positioning output to...
// 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...
use winapi::um::winuser; use std::fmt; #[derive(Debug)] pub struct Event { pub key: Key, pub state: KeyState, pub modifier: Modifier, } impl Event { pub fn new(key: Key, state: KeyState) -> Self { Self { key, state, modifier: Modifier::new(), } ...
use crate::common::forward; use crate::common::vertices; use crate::common::LowRuleApplication; use crate::reasoner::{Quad, Reasoner}; use crate::rule::{Entity, LowRule, Rule}; use crate::translator::Translator; use alloc::collections::{BTreeMap, BTreeSet}; use core::fmt::{Debug, Display}; /// Locate a proof of some c...
// Copyright 2016 Google Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
use cipher::block::{BlockFn, BlockCipher}; use cipher::block::feistel::Feistel; use keyed::Keyed; use secret::Secret; use utils::traits::signs::{ToSigned, ToUnsigned}; use utils::traits::truncate::Truncate; use utils::traits::wrapping::WrappingSub; use array::Array; use typenum::consts::U16; mod tables; struct DesR...
//! Core definitions module. use std::{ collections::{BTreeMap, BTreeSet}, convert::{TryFrom, TryInto}, fmt::Display, }; use anyhow::anyhow; use oasis_runtime_sdk_macros::{handler, sdk_derive}; use thiserror::Error; pub use oasis_core_keymanager_api_common::KeyManagerError; use crate::{ callformat, ...
//! esp-idf source and tools installation. //! //! This module enables discovering and/or installing an `esp-idf` GIT repository, //! and the corresponding tools for an `esp-idf` version. //! //! Right now, there are two locations where the `esp-idf` source and tools are //! detected and installed: //! - **[`install_di...
use prelude::*; use process::Process; use rcore_fs::vfs::{FileType, FsError, INode, Metadata, Timespec}; use std::sgxfs as fs_impl; use {process, std}; use super::*; pub use self::access::{do_access, do_faccessat, AccessFlags, AccessModes, AT_FDCWD}; pub use self::file::{File, FileRef, SgxFile, StdinFile, StdoutFile}...
use std::cell::RefCell; use std::ffi::{self, CStr, CString}; use std::fmt; use std::os::raw::c_char; use std::ptr; pub mod sys; // Re-export enums pub use sys::{ AllocatorType, ErrorCode, ExecutionMode, GraphOptimizationLevel, LoggingLevel, MemType, OnnxTensorElementDataType, OnnxType, CUDAProviderOptions, Cud...
use crate::square_value::SquareValue; use std::fmt; use std::ops::RangeInclusive; // A sudoku game has a name and 9x9 squares with values // The depth indicates how many levels of 'guesses' were needed to find solution. 0 = no guessing // You can optionally provide a logger function to output intermediate steps // log...
//! Compact singular-value decomposition of matrices #![allow(clippy::type_complexity)] use std::ops::MulAssign; use ndarray::{s, Array1, Array2, ArrayBase, Axis, Data, DataMut, Ix2, NdFloat}; use crate::{ bidiagonal::Bidiagonal, eigh::{cmp_floats, wilkinson_shift}, givens::GivensRotation, index::*,...
#![cfg_attr(feature = "benchmark", feature(test))] // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0>. // This file may not be copied, modified, or distributed // except according to those terms. //! Solar Position Algorithm module for Rust //! //! Colle...
// Imported from c0dearm/sharks https://github.com/c0dearm/sharks/blob/master/src/field.rs // // Basic operations overrided for the Galois Field 256 (2**8) // Uses pre-calculated tables for 0x11d primitive polynomial (x**8 + x**4 + x**3 + x**2 + 1) use core::{ iter::{Product, Sum}, ops::{Add, Div, Mul, Sub}, }; p...
//! This module contains structs and functions that handle event input. //! //! There are three basic structs defined by this module //! they are `KeyboardInfo`, `MouseInfo`, and `TextInfo`. //! `KeyboardInfo` holds current keyboard events. //! `MouseInfo` holds current mouse events. //! `TextInfo` holds the most rece...
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use crate::common_utils::{buffer, fidl::connect_in_paths}; use crate::modular::types::{ BasemgrResult, KillBasemgrResult, LaunchModRequest, RestartSessi...
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // TODO(fxb/68069): Add module documentation describing Setting Proxy's role in // setting handling. use crate::handler::base::{ Error as HandlerError,...
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use { anyhow::Error, bt_a2dp::{codec::MediaCodecConfig, media_task::*}, bt_a2dp_metrics as metrics, bt_avdtp::{self as avdtp, MediaStream},...
//! Generic system dependent windows via glium+glutin use crate::config::Config; use crate::failure::Error; use crate::font::FontConfiguration; use crate::guicommon::host::{HostHelper, HostImpl, TabHost}; use crate::guicommon::tabs::{Tab, TabId, Tabs}; use crate::guicommon::window::{Dimensions, TerminalWindow}; use cr...
// Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0. //! The implementation of asynchronous write for raftstore. //! //! `WriteTask` is the unit of write which is created by a certain //! peer. Afterwards the `WriteTask` should be sent to `Worker`. //! The `Worker` is responsible for persisting `WriteTas...
use crate::x86_64::instructions::msr::*; use crate::x86_64::structures::guest::VcpuGuestRegs; use crate::{AlignedAddress, SHIFT_4K}; use bitflags::bitflags; use libvmm_macros::*; global_asm!(include_str!("vmx.s")); extern "C" { fn vmx_return() -> bool; fn vmx_vmlaunch(guest_regs: &mut VcpuGuestRegs) -> bool; ...
//! Mockchain ledger. Ledger exists in order to update the //! current state and verify transactions. use crate::block::{BlockDate, ChainLength, ConsensusVersion, HeaderHash}; use crate::config::{self, Block0Date, ConfigParam}; use crate::fee::{FeeAlgorithm, LinearFee}; use crate::leadership::bft::LeaderId; use crate:...
//! Translation between Serde data formats. //! //! xt's transcoder is somewhat inspired by the [`serde_transcode`] crate //! advertised in the Serde documentation. However, its implementation has //! diverged significantly to enable the preservation of original (de)serializer //! error values, in contrast to `serde_tr...
use crate::cx::*; #[derive(Debug, Copy, Clone)] pub enum Wrapping { Char, Word, Line, None, Ellipsis(f32) } #[derive(Debug)] #[repr(C, packed)] pub struct DrawText { pub shader: Shader, pub area: Area, pub many: Option<ManyInstances>, pub many_old_area: Area, pub slots: usize, ...
use std::{cell::RefCell, rc::Rc}; use crate::util::{bit, res, set}; /// The colour palette used in DMG mode. /// 0 - White /// 1 - Light Gray /// 2 - Dark Gray /// 3 - Black static DMG_MODE_PALETTE: [u32; 4] = [0xFF18D0FE, 0xFF0056D3, 0xFF10125E, 0xFF05040D]; /// Represents sprite data as stored in OAM. #[derive(Clo...
#![feature(try_from)] extern crate diesel; extern crate http; extern crate iron; #[macro_use] extern crate lazy_static; extern crate matrix_rocketchat; extern crate persistent; extern crate r2d2; extern crate r2d2_diesel; extern crate rand; extern crate reqwest; extern crate router; extern crate ruma_client_api; exter...
use crate::{ api, auth::Auth, bus, command, config, currency::{Currency, CurrencyBuilder}, db, idle, injector::Injector, module, oauth2, prelude::*, settings, stream_info, template, timer, utils::{self, Cooldown, Duration}, }; use failure::{bail, format_err, Error, ResultExt as _...
use super::{GPCommand, GX_PIPE}; #[derive(Debug, Clone, Copy, Default, Eq, PartialEq, Ord, PartialOrd, Hash)] #[repr(transparent)] pub struct BPReg(u8); impl BPReg { pub const GEN_MODE: Self = Self(0x00); pub const DISP_COPY_FILT0: Self = Self(0x01); pub const DISP_COPY_FILT1: Self = Self(0x02); pub co...
//! Arranges a collection into a re-usable trace structure. //! //! The `arrange` operator applies to a differential dataflow `Collection` and returns an `Arranged` //! structure, provides access to both an indexed form of accepted updates as well as a stream of //! batches of newly arranged updates. //! //! Several op...
#![warn(non_camel_case_types)] extern crate alga; extern crate nalgebra as na; extern crate ncollide3d; extern crate nrays; extern crate png; use na::{Isometry3, Perspective3, Point2, Point3, Unit, Vector2, Vector3}; use ncollide3d::bounding_volume::{HasBoundingVolume, AABB}; use ncollide3d::query::RayCast; use ncoll...
#![cfg_attr(docsrs, feature(doc_cfg))] //! # BlueR - Official BlueZ Bindings for Rust //! //! This library provides the official Rust interface to the [Linux Bluetooth protocol stack (BlueZ)]. //! Both publishing local and consuming remote [GATT services] using *idiomatic* Rust code is supported. //! L2CAP sockets are...
#![allow(non_snake_case)] #[cfg(feature = "accelerate")] extern crate accelerate_src; #[cfg(feature = "blis")] extern crate blis_src; #[cfg(feature = "blis")] extern crate cblas; pub fn naive(m: usize, k: usize, n: usize, a: &[f32], b: &[f32], c: &mut [f32]) { for row in 0..m { for col in 0..n { ...
#![allow(clippy::needless_pass_by_value)] use crate::peer_store::Status; use crate::protocol::Protocol; use crate::protocol_service::ProtocolService; use crate::transport::TransportOutput; use crate::Network; use ckb_util::Mutex; use fnv::FnvHashMap; use futures::future::{self, Future}; use futures::sync::{mpsc, onesh...
/* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wri...
mod command_utils; mod config; mod error; pub mod pod_utils; use crate::error::Error; use crate::config::{create_config_map_name, create_config_map_with_data}; use crate::pod_utils::filter_pods_for_type; use async_trait::async_trait; use k8s_openapi::api::core::v1::{ConfigMap, Node, Pod}; use k8s_openapi::apimachiner...
extern crate harfbuzz_rs; use self::harfbuzz_rs::hb; use std; use std::cell::RefCell; use std::cmp::min; pub use self::harfbuzz_rs::Position; use self::harfbuzz_rs::{ shape, Blob, Feature, Font, GlyphBuffer, GlyphInfo, GlyphPosition, HarfbuzzObject, Shared, Tag, UnicodeBuffer, }; use self::harfbuzz_rs::{FontF...
#![deny(clippy::perf)] #![allow(clippy::complexity, clippy::new_without_default)] #[macro_use] extern crate log; #[macro_use] extern crate serde_derive; use anyhow::{bail, Context, Error, Result}; use async_trait::async_trait; use cachepot::config::{ scheduler as scheduler_config, worker, WorkerUrl, INSECURE_DIST_...
use std::{error::Error, fmt::Display}; use crate::{HasPosition, LineSideInfo, Point2, SpadeNum}; use num_traits::Float; /// Indicates a point's projected position relative to an edge. /// /// This struct is usually the result of calling /// [DirectedEdgeHandle::project_point](crate::handles::DirectedEdgeHandle::proje...
#![allow(non_snake_case)] use fitsio::FitsFile; use std::cmp::{max, min}; use std::env; use time as precise_time; use ocl::Buffer; use ocl::ProQue; use rand::distributions::{StandardNormal, Uniform}; use rand::prelude::*; use rand::seq::SliceRandom; use rayon::prelude::*; const TILE_SIZE: usize = 256; fn main() { ...
use anyhow::{anyhow, Context, Result}; use cached::proc_macro::cached; use lcu::{LCUClient, LCUWebSocket}; use rusqlite::NO_PARAMS; use rusqlite::{params, Connection, Row}; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; use std::str; use std::sync::mpsc::channel; use std::thread; use std::time::{self, Dur...
// Copyright 2018 <NAME> <<EMAIL>> // Licensed under the MIT License. //! The main application state. use chrono::{DateTime, Duration, Utc}; use diesel::prelude::*; use diesel::sqlite::SqliteConnection; use petgraph::prelude::*; use std::collections::HashMap; use structopt::StructOpt; use tcprint::ColorPrintState; us...
// Copyright (c) Microsoft. All rights reserved. #![deny(rust_2018_idioms)] #![warn(clippy::all, clippy::pedantic)] #![allow( clippy::default_trait_access, clippy::let_and_return, clippy::let_unit_value, clippy::missing_errors_doc, clippy::module_name_repetitions, clippy::must_use_candidate, ...
use iso8601_duration::Duration as IsoDuration; use lazy_static::lazy_static; use nom::{ branch::*, bytes::complete::*, character::complete::*, character::*, combinator::*, error::{Error, ErrorKind}, multi::*, sequence::*, Err, IResult, }; use std::str::FromStr; use taskchampion::chro...
//! Simple model for acceleration of non-thermal electron beams described by power-law distributions. use super::super::{ super::super::{accelerator::Accelerator, detection::ReconnectionSiteDetector, feb}, PowerLawDistribution, PowerLawDistributionConfig, PowerLawDistributionData, }; use crate::{ constants...
#![feature(static_nobundle)] //! Rust low level bindings for [IUP][1] -- A Portable User Interface Toolkit //! //! [1]: http://www.tecgraf.puc-rio.br/iup/ //! //! These bindings follow what is found in iup.h as closely as possibly with //! the following exceptions: //! //! 1. C function-like macros have been converted ...
use ferrousc_ast::nodes::*; use ferrousc_lexer::{Token, TokenKind}; const ASSIGNMENT_TOKENS: [TokenKind; 2] = [ TokenKind::Equal, TokenKind::QuestionQuestionEquals, ]; const OPERATORS: [TokenKind; 44] = [ TokenKind::Plus, TokenKind::Minus, TokenKind::Star, TokenKind::Slash, Tok...
use std::cmp::max; use std::collections::HashSet; use std::f64::INFINITY; use std::fmt::Debug; use std::io; use std::io::Write; use byteorder::{LittleEndian, WriteBytesExt}; use crate::geom; use crate::geom::{FaceLike, RaycastHit}; use crate::scalar::FloatRange; use crate::threed::{Basis3, Frame3, Pt3, Ray3, Vec3}; ...
//! This module contains the [`Space`] helper class as well has related //! rendering helpers to add custom elements or different clients to a space. use crate::{ backend::renderer::{utils::SurfaceState, Frame, ImportAll, Renderer}, desktop::{ layer::{layer_map_for_output, LayerSurface}, window...
//! GPIO, RP2040 //! //! ### Author //! * <NAME> <<EMAIL>> use enum_primitive::cast::FromPrimitive; use enum_primitive::enum_from_primitive; use kernel::common::cells::OptionalCell; use kernel::common::registers::interfaces::{ReadWriteable, Readable, Writeable}; use kernel::common::registers::{register_bitfields, regi...
use owo_colors::{AnsiColors, DynColors}; use serde::Serialize; use std::env; use strum::{EnumIter, EnumString, IntoStaticStr}; pub struct Colors { basic_colors: Vec<DynColors>, true_colors: Option<Vec<DynColors>>, } /// Maps colors to preferred versions. Used to allow contributors to include /// colors with m...
//! The `agenix` command-line interface. use std::collections::HashMap; use std::env; use std::fs::{self, File}; use std::io::{self, BufReader, Read, Seek, SeekFrom, Write}; use std::path::{Component, Path, PathBuf, MAIN_SEPARATOR}; use std::process::{Command, Stdio}; use age::{ armor::{ArmoredReader, ArmoredWrit...
//! A Wrapper for module which synchronizes opening/closing and all changes with Language Server. use crate::prelude::*; use crate::double_representation::definition::DefinitionInfo; use crate::double_representation::graph::Id; use crate::model::module::API; use crate::model::module::NotificationKind; use crate::mode...
use ethabi::RawLog; use rust_decimal::Decimal; use web3::contract::{Contract, Options}; use web3::types::{H160, H256, U256}; use web3::{ transports::Http, types::{BlockId, FilterBuilder, Log as Web3Log}, Web3, }; use std::time::Duration; use tokio::task::spawn; use tokio::time::delay_for as sleep; use cra...
// Copyright 2016 Google Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
use crate::model::repo::RepoSource; use crate::model::repo::RepoState; use crate::pure_functions::files; use crate::repo::document_repo; use crate::repo::schema::{OneKey, Tx}; use crate::service::file_compression_service; use crate::service::file_encryption_service; use crate::CoreError::RootNonexistent; use crate::{Co...
use holochain_core::{ action::{Action, ActionWrapper}, network::entry_with_header::EntryWithHeader, nucleus::ZomeFnCall, signal::{Signal, SignalReceiver}, }; use holochain_core_types::{cas::content::AddressableContent, entry::Entry}; use neon::{context::Context, prelude::*}; use std::{ cell::RefCell...
#![feature(convert)] // as_str() #![feature(str_char)] // is_char_boundary() #![feature(core)] extern crate core; use core::cmp::{Ord, Ordering}; use std::collections::HashMap; use std::hash::Hash; macro_rules! push_str_ln { ( $s:expr, $( $x:expr ),* ) => { $( $s.push_str($x); )* ...
// FFI note: this file changed a lot between 3.6 and 3.10. // Some missing definitions may not be marked "skipped". use crate::pyport::{Py_hash_t, Py_ssize_t}; use std::mem; use std::os::raw::{c_char, c_int, c_uint, c_ulong, c_void}; use std::ptr; #[cfg(Py_LIMITED_API)] opaque_struct!(PyTypeObject); #[cfg(not(Py_LIMI...
use core::cell::Cell; use kernel::common::cells::{OptionalCell, TakeCell}; use kernel::common::registers::{register_bitfields, ReadOnly, ReadWrite, WriteOnly}; use kernel::common::StaticRef; use kernel::debug; use kernel::hil; use kernel::hil::i2c::{self, Error, I2CHwMasterClient, I2CMaster}; use kernel::ClockInterfa...
// Copyleft (ↄ) 2021 BxNiom <<EMAIL>> | https://github.com/bxniom // // This work is free. You can redistribute it and/or modify it under the // terms of the Do What The Fuck You Want To Public License, Version 2, // as published by Sam Hocevar. See the COPYING file for more details. /// Known bool capabilities pu...
// 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...
// Copyright (c) SimpleStaking, Viable Systems and Tezedge Contributors // SPDX-License-Identifier: MIT //! This module contains an implementation of Irmin's context hashes. //! //! A document describing the algorithm can be found [here](https://github.com/tarides/tezos-context-hash). use std::{array::TryFromSliceErr...
//! (representation) Probabilistic context-free grammar without bound variables or polymorphism. //! //! # Examples //! //! ``` //! # #[macro_use] //! # extern crate polytype; //! # extern crate programinduction; //! use programinduction::pcfg::{task_by_evaluation, Grammar, Rule}; //! //! fn evaluator(name: &str, inps:...
use std::cmp::min; use std::collections::HashSet; use std::convert::TryInto; use std::future::Future; use std::io::IoSlice; use std::mem::replace; use std::net::SocketAddr; use std::pin::Pin; use std::task::Poll; use std::time::{Duration, SystemTime}; use std::{fmt, io, slice}; use futures_util::future::poll_fn; use f...
// There are a lot of assert_eq!(...) statements for debugging purposes, // since I haven't linked this file to src/bin.rs, and thus it can't be // stepped through in debugging. // Stuff that I have tried but didn't complete with getting to work // is also commented out. // use bitreader::BitReader; use modules::colla...
use std::convert::TryInto; use std::error::Error; use std::fmt::{self, Debug, Display, Formatter}; use memchr::memchr; use crate::checksum::Checksum; use crate::util::SliceDiffs; use crate::varint; const MAGIC: &[u8] = b"UPS1"; /// Possible errors when parsing an UPS patch file. #[derive(thiserror::Error, Debug)] p...
use crate::{descriptors::*, DynamicMessage, Error}; use bytes::{buf::Buf, Bytes}; use looking_glass::{CowValue, Instance, OwnedValue, SmolStr, StructInstance, Typed, Value, ValueTy}; use once_cell::sync::OnceCell; use prost::encoding::{decode_key, decode_varint, WireType}; use rustc_hash::FxHashMap; use std::{any::Type...
// In this file are all the Structs and Impls required to decode and encode the PackFiles. extern crate chrono; extern crate failure; use self::chrono::{ NaiveDateTime, Utc }; use std::path::PathBuf; use std::io::prelude::*; use std::io::{ BufReader, BufWriter, Read, Write, SeekFrom }; use std::fs::File; use failu...
//! This module provides the [`WorldStateView`] - in-memory representations of the current blockchain //! state. use std::{ convert::Infallible, fmt::Debug, iter::once, ops::{Deref, DerefMut}, sync::{Arc, RwLock}, time::Duration, }; use config::Configuration; use dashmap::{ mapref::one::{R...
use super::{ check_lengths, record_head, trim_cr, QualRecordPosition, SearchPos, SeqRecordPosition, }; use crate::fastx::{Error, ErrorKind, Result}; use crate::policy::BufPolicy; use crate::{ErrorOffset, ErrorPosition}; use std::io; use std::ops::Deref; /// Reader state #[derive(Debug, Eq, PartialEq, Clone, Copy)]...
#![allow(dead_code)] use anyhow::*; const WIDTH: i8 = 15; const DEPTH: i8 = 5; const HHKB: bool = WIDTH > 10; const fn hhkb_ortho(hhkb: f64, ortho: f64) -> f64 { if HHKB { hhkb } else { ortho } } // we are mostly working in inches, except for the holes const MM_IN: f64 = 25.4; const KE...
use crate::LatexSecNumDepth; use crate::OptionsWithRenderedPreamble; use bookbinder_ast::{NumberFormat, TextHeaderOptions}; use bookbinder_common::fonts::{font_exists, FontInfo, SANS_FONT_PATHS, SERIF_FONT_PATHS}; use bookbinder_common::MimeTypeHelper; use std::borrow::Cow; use std::path::{Path, PathBuf}; use temp_file...
// MIT/Apache2 License //! This module defines the Image struct, as well as procedures for manipulating images. #![allow(clippy::similar_names, clippy::unreadable_literal)] // Note: There is a lot of code in this file that's copied from Xlib, and it is going to be messy and // unoptimized. Anyone who knows stuff abo...
use rafx::render_feature_prepare_job_predule::*; use super::*; use crate::phases::{ DepthPrepassRenderPhase, OpaqueRenderPhase, ShadowMapRenderPhase, WireframeRenderPhase, }; use rafx::base::resource_map::{ReadBorrow, WriteBorrow}; use rafx::framework::{DescriptorSetBindings, MaterialPassResource, ResourceArc, Res...
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! Event Stream message frame types and serialization/deserialization logic. use crate::buf::count::CountBuf; use crate::buf::crc::{CrcBuf, CrcBufMut}; use crate::error::Error; use crate::str_bytes::S...
use crate::bitset::{BitSet1D, BitSet2D, BitSet3D, BitSetRef2D, BitSetRefMut2D}; use crate::expression::Expression; use crate::words::{Char, Tranche, Word}; use indexmap::IndexMap; use std::time::Instant; /// Search depth for phrase length, the number of words pub type PhraseDepth = usize; /// State for evaluating whi...
// Copyright 2020 Parity Technologies (UK) Ltd. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, mer...
// 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::errors::*, fidl_fuchsia_io::{ self as fio, DirectoryProxy, CLONE_FLAG_SAME_RIGHTS, OPEN_RIGHT_READABLE, OPEN_RIGHT_WRI...
// Copyright (c) Microsoft. All rights reserved. #![deny(rust_2018_idioms, warnings)] #![deny(clippy::all, clippy::pedantic)] #![allow( non_camel_case_types, non_snake_case, clippy::must_use_candidate, clippy::use_self, )] //! Refs: //! //! - <https://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/pkcs11-base-v2.4...
use std::{ fmt::{Debug, Display, Formatter}, iter::once, }; use factorial::Factorial; use itertools::Itertools; use crate::{utils, Bell, Row, Stage}; /// A single element of a [`Regex`] expression. #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] pub enum RegexElem { /// One single specific [`Bell`]. ...
use crate::config::Args; use crate::context::{ContextX, ErasureInfo}; use crate::debugger::Debugger; use crate::unsupported; use crate::util::{from_raw_span, signalling}; use air::ast::{Command, CommandX, Commands}; use air::context::ValidityResult; use air::errors::{Error, ErrorLabel}; use rustc_hir::OwnerNode; use ru...
use super::sys; /// Error type returned by all Rust wrappers of Argon2 functions. #[derive(Debug, PartialEq, Eq)] pub enum Error { /// This error is returned whenever a bad parameter is passed in but doesn't make it past the /// wrapper layer. e.g. a parameter that cannot be converted to the type required by t...
use crate::{ ast::{ConditionalPiece, Expr, Identifier, RangedVar, Stmt}, inverter, lexer::TokenKind, parser::{self, CalcError}, prelude, symbol_table::SymbolTable, }; pub(crate) struct Context<'a> { pub(crate) symbol_table: &'a mut SymbolTable, current_function_name: Option<String>, ...
use std::{ collections::hash_map::Entry, sync::{ Arc, Mutex, RwLock, }, }; use tracing::debug; use crate::{ error::StorageOpDeclined, head::Head, network::{ SlabRef, Transmitter, TransmitterArgs, TransportAddress, }, slab::{ ...
mod account_storage; use crate::account_storage::EmulatorAccountStorage; use evm_loader::{ instruction::EvmInstruction, solana_backend::SolanaBackend, account_data::{AccountData, Account, Contract}, }; use evm::{executor::StackExecutor, ExitReason}; use bincode::serialize; use hex; use primitive_types::{H...
use { std::{ fmt, io::{ self, prelude::* }, iter::FromIterator, ops::{ AddAssign, Index, IndexMut } }, css_color_parser::Color, itertools::{ Itertools as _, Position }, mtg...
// unsafe { // lets goooo use std::marker::PhantomPinned; use std::mem::MaybeUninit; use std::ptr; use std::{ffi::c_void}; use wl_sys as wl; use crate::tree::ViewRef; use crate::{window_manager::WindowManager, wlroots_compositor::server::*}; use super::{server::View, wl_util::*}; pub fn run_server() { unsa...
// "asi_vulkan" - Aldaron's System Interface - Vulkan // // Copyright <NAME> 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) #[macro_use] extern crate dl_api; extern crate awi; extern crate euler; // Mod...