text
stringlengths
9.08k
47.9k
use crate::{ discord::beatmap_cache::BeatmapMetaCache, discord::oppai_cache::{BeatmapCache, BeatmapInfo, OppaiAccuracy}, models::{Beatmap, Mode, Mods, Score, User}, request::UserID, Client as OsuHttpClient, }; use serenity::{ framework::standard::{ macros::{command, group}, Args,...
/* * Copyright 2019 OysterPack Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
// Copyright (c) 2017-2018, The rav1e contributors. All rights reserved // // This source code is subject to the terms of the BSD 2 Clause License and // the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License // was not distributed with this source code in the LICENSE file, you can // obtain it at ...
/*! Trigonometry from complex !*/ use std::fmt; use std::fmt::{Debug, Display, Formatter}; use std::hash::Hash; use std::ops::*; use std::str::FromStr; use num::{ bigint::BigInt, rational::{ParseRatioError, Ratio}, {Signed, Zero}, }; use egg::*; use ruler::*; pub type Rational = Ratio<BigInt>; // c...
// This is a battery of unit tests taken directly from my original Go project. // I know the test names suck, but I'm not going to change them because I want line-for-line compatibility with the Go tests. use fasteval::{Evaler, ExpressionI, Parser, Error, Slab, EmptyNamespace, CachedCallbackNamespace}; use std::coll...
// Copyright 2022 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. //! Private functionality for pbms lib. use { crate::{gcs::fetch_from_gcs, repo_info::RepoInfo}, anyhow::{bail, Context, Result}, fms::{find_p...
mod base_dir; mod cleanup; mod fetch_blocks; mod fetch_dir; mod fetch_index; mod progress; mod reconciliation; mod rpc; use std::collections::{HashMap, HashSet, BTreeMap, BTreeSet}; use std::net::SocketAddr; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::{Arc}; use s...
// adapted from https://github.com/davidB/kubectl-view-allocations // TODO move to use this directly from dependency if https://github.com/davidB/kubectl-view-allocations/issues/128 is resolved use anyhow::{anyhow, Context, Error, Result}; use itertools::Itertools; use k8s_openapi::{ api::core::v1::{Node, Pod}, ap...
use crate::connection_options::ConnectionOptions; use crate::errors::*; use crate::io_loop::{Channel0Handle, IoLoop}; use crate::{Channel, FieldTable, IoStream, Sasl}; use crossbeam_channel::Receiver; use log::debug; use std::thread::JoinHandle; #[cfg(feature = "native-tls")] use crate::TlsConnector; /// Asynchronous...
use std::mem; use std::vec::Vec; use crate::endian::*; use crate::macho; use crate::pod::BytesMut; use crate::write::string::*; use crate::write::util::*; use crate::write::*; #[derive(Default, Clone, Copy)] struct SectionOffsets { index: usize, offset: usize, address: u64, reloc_offset: usize, } #[d...
mod provider_guards; #[macro_use] extern crate log; use std::collections::{HashMap, HashSet}; use std::collections::hash_map::Entry; use std::sync::{Arc, Mutex, MutexGuard, TryLockError}; use std::{thread, fmt}; use std::thread::JoinHandle; use serde::Serialize; use std::time::{Instant, Duration}; use crossbeam::chan...
//#![feature(rsawot)] #[macro_use] extern crate log; #[macro_use] extern crate mydht_base; #[macro_use] extern crate mydht; extern crate mydht_filestore; extern crate mydht_inefficientmap; extern crate mydht_bincode; extern crate mydht_wot; extern crate mydht_udp; extern crate mydht_tcp; extern crate env_logger; ex...
// 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 in the LICENSE-APACHE file or at: // https://www.apache.org/licenses/LICENSE-2.0 //! List view widget use super::{driver, Driver, ListData,...
use rltk::{RGB, Rltk, Point, VirtualKeyCode, Rect}; use super::{Health, Player, gamelog::PlayerLog, Map, Name, state::State, InBackpack, Viewshed, RunState, Equipped, Poise, drawing, dancing, text::capitalize, Stamina, cellinfo::cell_info, CanDoDances, HasAggroedMosters}; use specs::prelude::*; #[derive(PartialEq, Cop...
//! A home of [RenderingBundle] with it's rendering plugins system and all types directly related to it. use std::collections::HashMap; use amethyst_assets::{register_asset_type, AssetProcessorSystem, AssetStorage}; use amethyst_core::ecs::*; use amethyst_error::{format_err, Error}; use rendy::init::Rendy; use crate...
use crate::subgraph::context::IndexingContext; use crate::subgraph::error::BlockProcessingError; use crate::subgraph::inputs::IndexingInputs; use crate::subgraph::metrics::SubgraphInstanceMetrics; use crate::subgraph::SubgraphInstance; use atomic_refcell::AtomicRefCell; use fail::fail_point; use graph::blockchain::bloc...
// 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...
/* Copyright 2019 Supercomputing Systems AG 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...
/* * The following code is derived from `lib/src/checker.rs` in the * regalloc.rs project * (https://github.com/bytecodealliance/regalloc.rs). regalloc.rs is * also licensed under Apache-2.0 with the LLVM exception, as the rest * of regalloc2's non-Ion-derived code is. */ //! Checker: verifies that spills/reload...
// Copyright 2017 GFX Developers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
use arrayvec::ArrayVec; use core::cell::{Cell, RefCell}; use core::ops::DerefMut; use usb_device::bus::{PollResult, UsbBusAllocator}; use usb_device::device::UsbDevice; use usb_device::endpoint::{EndpointAddress, EndpointType}; use usb_device::{Result, UsbDirection, UsbError}; use cortex_m::asm; use cortex_m::periph...
#![warn( clippy::all, clippy::missing_docs_in_private_items, clippy::nursery, clippy::pedantic, missing_docs )] #![cfg_attr( feature = "nightly", feature(external_doc), doc(include = "../README.md") )] #![cfg_attr(not(feature = "nightly"), doc = "")] use std::{ fmt::Debug, os::r...
use crate::bellman::pairing::{ Engine, CurveAffine, }; use crate::bellman::pairing::ff::{ Field, PrimeField, PrimeFieldRepr, BitIterator }; use crate::bellman::{ SynthesisError, }; use crate::bellman::plonk::better_better_cs::cs::{ Variable, ConstraintSystem, }; use crate::bellm...
use super::types::MethodDetails; use crate::utils::{self, parse_node_str}; use std::collections::{HashMap, HashSet, VecDeque}; use lib_ruby_parser::{ nodes::{self, Index}, Node, }; #[derive(Debug, PartialEq)] enum SendTypes { ParamsPermit, ParamsRequire, ParamsRequirePermit, Invalid, } impl s...
use crate::c8y_fragments::{C8yAgentFragment, C8yDeviceDataFragment}; use crate::error::*; use crate::size_threshold::SizeThreshold; use crate::{converter::*, operations::Operations}; use c8y_smartrest::smartrest_serializer::{SmartRestSerializer, SmartRestSetSupportedOperations}; use c8y_smartrest::{alarm, event}; use c...
//! FMOD bindings for the Sludge framework. This crate both contains a high-level //! Rust interface to a subset of the FMOD Core/Studio APIs, as well as bindings //! to those Rust interfaces through Lua by way of Sludge's module registration //! API. #![feature(arc_mutate_strong_count)] use ::{ crossbeam_channel...
// Copyright 2020 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot 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 late...
use super::{mem, sfx, video, Game}; use rand::Rng; use std::time::{Duration, Instant}; const CALL_STACK_SIZE: u8 = 64; const TASK_COUNT: usize = 64; // Special program counter values to halt tasks. const HALT_PC: u16 = 0xFFFF; const PRE_HALT_PC: u16 = 0xFFFE; mod reg_id { pub const RANDOM_SEED: usize = 0x3C; ...
#[macro_use] extern crate maplit; extern crate ggez; extern crate itertools; extern crate midly; extern crate nalgebra; extern crate rodio; mod anim; mod assets; mod counting_source; use std::{ collections::HashMap, convert::TryFrom, env, fs, io::BufReader, path, time::Duration, sync::{Arc, atomic::{...
//! Low level bindings to the PCSC C API. //! //! The following platforms are supported: //! //! - On Windows, the built-in `WinSCard.dll` library and "Smart Card" //! service. See [MSDN][1] for documentation of the implemented API. //! //! - On macOS, the built-in PCSC framework. //! //! - On Linux, BSDs and (hopefu...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] #![allow(dead_code)] #[cfg(test)] mod executor_test; #[cfg(test)] mod mock_vm; use anyhow::{bail, ensure, format_err, Result}; use debug_interface::prelude::*; use executor_types::{ExecutedTrees, ProcessedVMOu...
// Copyright 2020 <NAME>. All rights reserved. // Copyright (C) 2020 Alibaba Cloud. All rights reserved. // // SPDX-License-Identifier: Apache-2.0 //! Structs and Traits for RAFS file system meta data management. use std::any::Any; use std::collections::HashSet; use std::ffi::{OsStr, OsString}; use std::fmt::{Debug, ...
//! Support for J-Link Debug probes use jaylink::{Capability, Interface, JayLink, SpeedConfig, SwoMode}; use std::convert::{TryFrom, TryInto}; use std::iter; use std::time::{Duration, Instant}; use crate::architecture::arm::RawDapAccess; use crate::{ architecture::{ arm::{ communication_inter...
pub(crate) fn spdp_participant_data_raw() -> Vec<u8> { const data: [u8; 204] = [ // Offset 0x00000000 to 0x00000203 0x52, 0x54, 0x50, 0x53, 0x02, 0x03, 0x01, 0x0f, 0x01, 0x0f, 0x99, 0x06, 0x78, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x01, 0x08, 0x00, 0x0e, 0x15, 0xf3, 0x5e, 0x00, 0x28, 0x74, 0xd2...
use crate::{ args::{Args, StreamEncoding}, dataflow::{ constants::{IDLE_EXTRACTION_FUEL, TCP_READ_TIMEOUT}, operators::{EventIterator, EventReader, Fuel, RkyvEventReader}, utils::{DifferentialLogBundle, ProgressLogBundle, TimelyLogBundle}, DataflowData, DataflowReceivers, }, ...
use std::{ convert::{TryFrom, TryInto}, fs, path::Path, str::FromStr, }; use anyhow::{bail, Context, Error, Result}; use clap::{App, Arg, ArgMatches, SubCommand}; use openssl::{ asn1::{Asn1Integer, Asn1Time}, bn::BigNum, ec::{EcGroup, EcKey}, hash::MessageDigest, nid::Nid, pkey:...
//! All values in buffers are accessed and modified through pointers //! //! NP_Ptr are the primary abstraction to read, update or delete values in a buffer. //! Pointers should *never* be created directly, instead the various methods provided by the library to access //! the internals of the buffer should be used. //...
// Copyright (c) 2016 The vulkano developers // 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. All files in the project carrying such // notice may not be co...
//! This tiny crate checks that the running or installed `rustc` meets some //! version requirements. The version is queried by calling the Rust compiler //! with `--version`. The path to the compiler is determined first via the //! `RUSTC` environment variable. If it is not set, then `rustc` is used. If //! that fails...
#![feature(rustc_private)] extern crate im; extern crate pretty; extern crate rustc_ast; extern crate rustc_driver; extern crate rustc_errors; extern crate rustc_hir; extern crate rustc_interface; extern crate rustc_metadata; extern crate rustc_middle; extern crate rustc_parse; extern crate rustc_session; extern crate ...
use std::str::FromStr; use std::convert::From; use std::collections::{HashMap, HashSet}; use std::fmt; use std::cmp::max; use std::result::Result as StdResult; use result::ResultIteratorExt; use rusqlite::{Connection, Result as SqlResult, Transaction, params_from_iter}; use rusqlite::types::{ToSql, ToSqlOutput, ValueRe...
use std::cell::{Cell, RefCell}; use std::fs; use std::path::{Path, PathBuf}; use std::rc::Rc; use std::sync::Arc; use gio::prelude::*; use gtk::prelude::*; use serde_derive::{Deserialize, Serialize}; use crate::anim; use crate::combo_box_enum::ComboBoxEnum; use crate::frame_export_dialog::SavedCheckbox; use crate::fr...
use bevy::{ core::FloatOrd, core_pipeline::Transparent2d, ecs::system::lifetimeless::{Read, SQuery, SRes}, ecs::system::SystemParamItem, prelude::*, // reflect::TypeUuid, render::{ mesh::Indices, render_asset::RenderAssets, render_component::{ComponentUniforms, Dynami...
/* eigen.rs 0.2 This piece of code is transpiled EigenvalueDecomposition.java from Jama framework. I had to do this, because I haven't found any buildable rust opensource project to calculate real eigen values in Rust. There are many packages which are usually bound to openBLAS, but I can't build them with gnu t...
use std::collections::HashMap; use std::collections::HashSet; use std::ffi::OsStr; use std::fs; use std::iter::FromIterator; use std::ops::Sub; use std::path::PathBuf; use anyhow; use anyhow::Context; use postgres; use postgres_native_tls; use native_tls; use crate::project::DatabaseProject; use crate::project::Databa...
mod addressmodes; mod operations; #[cfg(test)] mod tests; use std::fs::File; use std::io::Write; use crate::address_bus::ExternalAddressing; use addressmodes::*; use operations::*; macro_rules! instr { ($name:expr,$operation:expr,$address_mode:expr,$cycles:expr) => {{ OperationDefinition { na...
// Copyright 2019-2020 Parity Technologies (UK) Ltd. // This file is part of Substrate. // Substrate 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) a...
use core::borrow::Borrow; use std::collections::HashMap; use std::mem; use thiserror::Error; use curve25519_dalek::ristretto::CompressedRistretto; use curve25519_dalek::scalar::Scalar; use serde::{Deserialize, Serialize}; use zkvm::bulletproofs::BulletproofGens; use accounts::{Address, AddressLabel, Receiver, Sequenc...
//! The workhorse of the compiler. //! Compiles the a BYOND AST proc into a CIL method. use crate::compiler_state::*; use crate::dmstate::DMState; use crate::il::*; use crate::CompilerError; use dreammaker::ast::*; use dreammaker::objtree::Code; use std::collections::HashMap; pub(crate) fn create_proc( the_proc: &...
use crate::renderer::Film; use crate::camera::{Camera, CameraId}; // use crate::config::Config; use crate::hittable::Hittable; use crate::materials::*; use crate::math::*; // use crate::profile::Profile; use crate::world::World; use crate::world::{MaterialId, TransportMode}; // use std::collections::HashMap; // use s...
// Copyright 2020 Google LLC // Copyright 2020 Team Spacecat // // 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...
// Functions around scoring states and moves use crate::{game::*, moves::*}; pub const JUMP_COST: i32 = -4; pub const JUMP_INACTIVE_COST: i32 = -24; pub const TAKE_ENEMY_REWARD: i32 = 20; pub const KING_DANGER_COST: i32 = -10; pub const ROOK_DANGER_COST: i32 = -3; pub const KNIGHT_DANGER_COST: i32 = -4; pub const BI...
use crate::response::{Language, NotionId}; use anyhow::{bail, Context, Result}; use maud::{html, Markup, PreEscaped}; use tree_sitter_highlight::{HighlightConfiguration, Highlighter, HtmlRenderer}; const RUST_HIGHLIGHTS: &str = include_str!("./rust.scm"); const HIGHLIGHTS: [&str; 17] = [ "attribute", "comment...
// Copyright 2015 <NAME>. See the COPYRIGHT // file at the top-level directory of this distribution. //! A library for working with [Google Breakpad][breakpad]'s //! text-format [symbol files][symbolfiles]. //! //! The highest-level API provided by this crate is to use the //! [`Symbolizer`][symbolizer] struct. //! //...
// Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the "hack" directory of this source tree. // // @generated SignedSource<<56d03d7f17335bd6942d9c113beeed6c>> // // To regenerate this file, run: // hphp/hack/src/oxidized_regen.s...
extern crate lib_revert; extern crate cgmath; use cgmath::Matrix; use cgmath::Matrix4; use cgmath::Vector3; use cgmath::Vector2; use cgmath::Vector4; use cgmath::SquareMatrix; use cgmath::InnerSpace; use cgmath::Transform; use lib_revert::pipeline::Pipeline; use lib_revert::util::Tri; use lib_revert::util::PositionV...
// Copyright 2020 <NAME>, <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. extern crate fasthash; extern crate petgraph; extern crate quickersort; extern crate slog; use self::slog::{crit, warn}; use fasthash::sea::Hash64; use fasthas...
use openlineage_sql::SqlMeta; #[macro_use] mod test_utils; use test_utils::*; #[test] fn test_tpcds_cte_query() { assert_eq!(test_sql(" WITH year_total AS (SELECT c_customer_id customer_id, c_first_name customer_first_name, c_last_name cu...
#![no_std] #![no_main] //! Space-Vector PWM (SVPWM) example for driving brushless DC (BLDC) motors. //! //! This uses a STM32 microcontroller to drive a STSPIN233-based motor driver, //! to achieve low-speed control of a drone-class BLDC motor using SVPWM. A //! unique feature of SVPWM is that it allows you to drive m...
#![no_std] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] macro_rules! glconst { ($($i:ident),*) => { paste::paste! { $( pub const $i: crate::types::GLenum = crate::sys::[<GL_ $i>] as crate::types::GLenum; )* } }; } macro_rules! glconst_rename { (...
// Copyright 2018 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...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Mode Register"] pub mr: crate::Reg<mr::MR_SPEC>, #[doc = "0x04 - Interrupt Enable Register"] pub ier: crate::Reg<ier::IER_SPEC>, #[doc = "0x08 - Interrupt Disable Register"] pub idr: crate::Reg<idr::IDR_SPEC>, #...
// This module may become a plugin in the future, but for now let's avoid the complexity // of dynamic loading. //! Compiler tactic for the metamath C language. //! //! See [`mmc.md`] for information on the MMC language. //! //! [`mmc.md`]: https://github.com/digama0/mm0/blob/master/mm0-rs/mmc.md // rust lints we wan...
// //! The Page Service listens for client connections and serves their GetPage@LSN //! requests. // // It is possible to connect here using usual psql/pgbench/libpq. Following // commands are supported now: // *status* -- show actual info about this pageserver, // *pagestream* -- enter mode where smgr and pa...
use std::fs::{self, File}; use std::io::{self, Read, Write, BufReader}; use std::net::{SocketAddr, TcpStream, UdpSocket}; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{mpsc::Sender, Arc}; use std::time::Duration; use anyhow::{anyhow, Error}; use chrono::{DateTime, Utc}; use la...
use bevy::render::mesh::{Indices, Mesh}; //use bevy::render::pipeline::PrimitiveTopology; use bevy::{ prelude::*, render::{ camera::Camera, // wireframe::{Wireframe, WireframeConfig, WireframePlugin}, }, utils::{Duration, Instant}, //wgpu::{WgpuFeature, WgpuFeatures, WgpuOptions}, }; ...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: November 23, 2017 Last Modified: Dec. 15, 2017 License: MIT NOTES: This tool implements a highly modified form of the algorithm described by Sun, Rosin, Martin, and Langbein (2007) Fast and effective feature-p...
// Copyright (c) The cargo-guppy Contributors // SPDX-License-Identifier: MIT OR Apache-2.0 use crate::graph::feature::{FeatureGraphImpl, FeatureId, FeatureNode}; use crate::graph::{cargo_version_matches, kind_str, DependencyDirection, PackageIx}; use crate::{Error, JsonValue, Metadata, MetadataCommand, PackageId}; us...
use super::{compile_shader, link_program, reflect_layout, Gl}; use crate::{ converters::*, gl_call, Buffer, Device, GlBufferInfo, GlShader, GlVertexBufferDescripror, WebGL2Pipeline, WebGL2RenderResourceBinding, WebGL2Resources, }; use bevy::asset::{Assets, Handle, HandleUntyped}; use bevy::log::prelude::*; use ...
//! Encoder for Code128 barcodes. //! //! Code128 is a popular, high-density symbology that allows for the encoding of alphanumeric //! data along with many special characters by utilising three separate character-sets. //! //! Code128 also offers double-density encoding of digits. //! //! ## Character sets //! //! Bar...
/// This module contains optional APIs for implementing QUIC TLS. use crate::cipher::{Iv, IvLen}; pub use crate::client::ClientQuicExt; use crate::conn::ConnectionCommon; use crate::error::Error; use crate::msgs::base::Payload; use crate::msgs::enums::{AlertDescription, ContentType, ProtocolVersion}; use crate::msgs::m...
// < begin copyright > // Copyright <NAME> 2020 // // See root directory of this project for license terms. // // < end copyright > use crate::models::Model; use crate::models::*; use bytesize::ByteSize; use log::*; use std::collections::HashSet; use std::io::Write; use std::str; use crate::train::TrainedRMI; ...
// Copyright 2014 <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, ...
//! Simulation for the car and racetrack //! //! There's a couple things to note here. The simulation is designed so that the directions from //! the user happen less frequently individual state updates (referred to as "ticks"). The //! simulation takes only a reference to a racetrack, with the only relevant state bein...
use std::net::Ipv6Addr; use crate::{ get_cpu_count, get_env_or_default_string, stats::StatConfig, Account, Amount, DiagnosticsConfig, IpcConfig, LmdbConfig, Logging, NetworkParams, Networks, RocksDbConfig, TomlWriter, WebsocketConfig, GXRB_RATIO, XRB_RATIO, }; use anyhow::Result; use once_cell::sync::Lazy;...
// This file was generated by gir (0d8699e+) from gir-files (11e0e6d+) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals)] #[allow(unused_imports)] use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, c_short, c_ushort, c_long, c_ulong, c_void, size_t, ssize_t, time_t, FILE}; #[al...
// Copyright 2019-2021 Parity Technologies (UK) Ltd. // This file is part of Parity Bridges Common. // Parity Bridges Common 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, ...
//! In the internet computer consensus protocol, parties may propose blocks in //! the form of block proposals. A participant can "notarize" any proposals they //! think are valid in a round by producing a notarization share for the //! proposal. Once enough participants have produced a notarization share for //! the s...
use core; use super::*; // Set up CPU's kernel segment descriptors. // Run once on entry on each CPU. pub unsafe extern "C" fn seginit() { // Map "logical" addresses to virtual addresses using identity map. // Cannot share a CODE descriptor for both kernel and user // because it would have to have DPL_USR...
//! The Emitter API provides high-level features over the raw Builder API, such //! as for loops and if statements. //! //! The Emitter API is a giant hack, primarily geared towards code generation //! from IR files, and is gross. use std::convert::TryInto; use super::builder::{ BlockId, DynBlockBuilder, FnSignat...
use super::traits; use crate::errors::RPMError; use chrono::{offset::TimeZone, DateTime, Utc}; use std::{ io::{Cursor, Read}, str::from_utf8, }; use pgp::{ composed::{Deserializable, SignedPublicKey, SignedSecretKey}, crypto::{hash::HashAlgorithm, public_key::PublicKeyAlgorithm}, packet::{ ...
//! //! # `#[real_async_trait]` //! [![travis]](https://travis-ci.org/4lDO2/real-async-trait-rs) //! [![cratesio]](https://crates.io/crates/real-async-trait) //! [![docsrs]](https://docs.rs/real-async-trait/) //! //! [travis]: https://travis-ci.org/4lDO2/real-async-trait-rs.svg?branch=master //! [cratesio]: https://img...
#![cfg_attr( not(test), warn( clippy::disallowed_method, clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests #![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( ba...
// Copyright 2017 <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 terms. ...
// // Copyright 2018-2019 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
use rustc::ty::{self, Ty, TypeFoldable, UpvarSubsts, Instance}; use rustc::ty::layout::{TyLayout, HasTyCtxt, FnTypeExt}; use rustc::mir::{self, Body}; use rustc::session::config::DebugInfo; use rustc_target::abi::call::{FnType, PassMode, IgnoreMode}; use rustc_target::abi::{Variants, VariantIdx}; use crate::base; use c...
/* * Copyright (C) 2015 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
use crate::consensus::VOTE_THRESHOLD_SIZE; use solana_ledger::blockstore::Blockstore; use solana_measure::measure::Measure; use solana_metrics::inc_new_counter_info; use solana_runtime::bank::Bank; use solana_sdk::clock::Slot; use solana_vote_program::{vote_state::VoteState, vote_state::MAX_LOCKOUT_HISTORY}; use std::{...
pub mod raw { use std::ffi::c_void; extern "C" { pub fn run_on_alternative_stack(stack_end: *mut u64, stack_begin: *mut u64) -> u64; pub fn register_preservation_trampoline(); // NOT safe to call directly pub fn setjmp(env: *mut c_void) -> i32; pub fn longjmp(env: *mut c_void, v...
//! The command set for the SSD1322. //! //! The display RAM of the SSD1322 is arranged in 128 rows and 120 columns, where each column is 4 //! adjacent pixels (segments) in the row for a total max resolution of 128x480. Each pixel is 4 //! bits/16 levels of intensity, so each column also refers to two adjacent bytes. ...
//! An implementation of "reduced tree" LMD GHOST fork choice. //! //! This algorithm was conceived at IC3 Cornell, 2019. //! //! This implementation is incomplete and has known bugs. Do not use in production. use super::{LmdGhost, Result as SuperResult}; use parking_lot::RwLock; use std::collections::HashMap; use std:...
use super::calc_consensus::{CalcNonOverlappingConsensus, CalcOverlappingConsensus}; use anyhow::Result; use bio::io::fastq; use derive_new::new; use rust_htslib::bam; use rust_htslib::bam::record::Aux; use rust_htslib::bam::Read; use std::cmp::Ordering; use std::collections::{BTreeMap, HashMap, HashSet}; use std::io; u...
// Copyright 2020 ETH Zurich and University of Bologna. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 //! Engine for dynamic binary translation and execution use crate::{riscv, tran::ElfTranslator, util::SiUnit, Configuration}; extern crate termion;...
use libc::c_int; pub const SQLITE_OK: c_int = 0; pub const SQLITE_ERROR: c_int = 1; pub const SQLITE_INTERNAL: c_int = 2; pub const SQLITE_PERM: c_int = 3; pub const SQLITE_ABORT: c_int = 4; pub const SQLITE_BUSY: c_int = 5; pub const SQLITE_LOCKED: c_int = 6; pub cons...
use core::cell::Cell; use kernel::common::cells::{OptionalCell, TakeCell}; use kernel::common::registers::interfaces::{ReadWriteable, Readable, Writeable}; use kernel::common::registers::{register_bitfields, ReadOnly, ReadWrite}; use kernel::common::StaticRef; use kernel::hil; use kernel::ClockInterface; use kernel::E...
//! Reading and interpreting data generation specifications. use serde::Deserialize; use snafu::{ResultExt, Snafu}; use std::{fs, ops::Range, str::FromStr}; /// Errors that may happen while reading a TOML specification. #[derive(Snafu, Debug)] pub enum Error { /// File-related error that may happen while reading ...
use crate::{ node::NodeComponent, schema::{Field, Schema}, types::*, }; use gloo_events::{EventListener, EventListenerOptions}; use gloo_storage::{LocalStorage, Storage}; use serde::{Deserialize, Serialize}; use std::{ collections::{BTreeMap, HashMap, HashSet}, rc::Rc, str::FromStr, }; use wasm_...
// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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 lat...
use app_units; use font_kit; use font_kit::{family_name::FamilyName, font, source::SystemSource}; use super::properties::*; use std::collections::HashMap; use webrender::api::*; use super::properties::{Align, Position}; use self::shaper::GlyphMetric; use unicode_bidi::BidiClass; use unicode_bidi::BidiInfo; mod shaper...
// Other video registers, for BG settings use bitflags::bitflags; use fixed::types::I8F8; use crate::video::BG; bitflags! { #[derive(Default)] pub struct ScreenDisplay: u8 { const F_BLANK = bit!(7); const BRIGHTNESS = bits![3, 2, 1, 0]; } } bitflags! { #[derive(Default)] ...