text
stringlengths
7.05k
33.9k
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - SPI1 memory command register"] pub cmd: crate::Reg<cmd::CMD_SPEC>, #[doc = "0x04 - SPI1 address register"] pub addr: crate::Reg<addr::ADDR_SPEC>, #[doc = "0x08 - SPI1 control register."] pub ctrl: crate::Reg<ctrl::C...
use crate::class::ClassDefId; use crate::field::FieldId; use crate::vm::{FctId, GlobalId}; use crate::bytecode::generate::Register; use crate::bytecode::opcode::Bytecode; #[derive(Copy, Clone)] pub enum BytecodeInst { Wide, AddInt, AddLong, AddFloat, AddDouble, SubInt, NegInt, NegLon...
// Copyright 2020 <NAME> <<EMAIL>> and collaborators // Licensed under the MIT License. //! Release automation utilities related to the GitHub service. use anyhow::{anyhow, Context}; use json::{object, JsonValue}; use log::{error, info, warn}; use std::{env, fs::File, path::PathBuf}; use structopt::StructOpt; use su...
extern crate r2k; use r2k::kana_table::KanaTable; #[cfg(test)] #[test] #[should_panic] fn test1() { let r2k: KanaTable = KanaTable::new(); let input: String = "Kimi ni kirawareta kimi no Chinmoku ga kikoeta\nKimi no me no mae ni iru no ni Tooku \ kara kikoeta\nHasshingen wo sagashitara Tadoritsuita m...
use crate::aabb::AABB; use crate::{CHUNK_SIZE, PIXELS_PER_TEXTURE, VOXEL_HALF}; use macroquad::{models::Vertex as Vert, prelude::*}; use std::collections::{HashMap, HashSet}; #[derive(Clone, Copy, Debug)] pub struct Block { // Index into World.block_types. IDs are assigned in order of registration // starting ...
//! # img_diff //! //! `img_diff` is a cmd line tool to diff images in 2 folders //! you can pass -h to see the help //! extern crate getopts; extern crate dssim; extern crate rayon; extern crate rgb; extern crate lodepng; extern crate imgref; extern crate bmp; use std::path::{Path, PathBuf}; use getopts::Options; use...
use std::{collections::HashMap, convert::TryInto, path::PathBuf, str::FromStr}; use anyhow::{bail, Context}; use probe_rs::{flashing::Format, DebugProbeSelector, WireProtocol}; use serde::{Deserialize, Serialize}; use serde_json::{Map, Value}; use structopt::StructOpt; /// A struct which holds all configs. #[derive(D...
//! The knife tool use druid::kurbo::{Line, LineIntersection, ParamCurve, ParamCurveArclen}; use druid::piet::StrokeStyle; use druid::{Color, Env, EventCtx, KbKey, KeyEvent, MouseEvent, PaintCtx, Point, RenderContext}; use crate::design_space::DPoint; use crate::edit_session::EditSession; use crate::mouse::{Drag, Mou...
// QuiZX - Rust library for quantum circuit rewriting and optimisation // using the ZX-calculus // Copyright (C) 2021 - <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // /...
use crate::s; use lazy_static::lazy_static; use std::{ cmp::min, collections::VecDeque, sync::{ atomic::{AtomicBool, AtomicUsize, Ordering}, Mutex, }, }; // Constants pub const VERSION: &str = "v2.0.3"; pub const DEFAULT_PAGE_SIZE: usize = 10; pub const MAX_PAGE_SIZE: usize = 100; pub...
use super::api; use super::crypto::{KeyMaterial, KeyProvider, gen_key_pair, decrypt_data}; use super::depa::aa::{EntityInfoResponse, EntityInfoEntry, AA_ENTITY_INFO_REQUEST}; use super::messaging::http; use super::messaging::http::HttpClient; use super::messaging::http::StatusCode; use super::options::Configuration; us...
#![cfg_attr(feature = "std", allow(unreachab_code, unused_variables))] use crate::{ uart::UartPeriph, pads::IocPadPeriph, iocsel::IocSelectorPeriph, sysctrl::SysCtrlPeriph, gpio::GpioPortPeriph, }; #[cfg(not(debug))] use crate::DSO_PORTS; use core::{ cmp::min, ptr, }; #[cfg(not(debug))]...
// بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم // This file is part of Setheum. // Copyright (C) 2019-2021 <NAME>. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publ...
use nwd::NwgUi; use fractal_protocol::{effect::EffectId, messages::effects::EffectStatus}; use native_windows_gui::{Tab, TabsContainer}; use log::trace; use std::{borrow::Borrow, cell::RefCell, sync::{Arc, Mutex}}; use axess_core::{payload::{PayloadConnection, UiPayload, DeviceState, PresetAndScene}, payload}; use su...
// Copyright 2020 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 //! Types of several IOTA APIs related objects use crate::Result; use bee_message::{ payload::milestone::{MilestonePayloadEssence, MILESTONE_MERKLE_PROOF_LENGTH}, prelude::*, }; use bee_pow::providers::{Constant, ConstantBuilder, ProviderB...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
// Copyright (c) Microsoft. All rights reserved. #![deny(rust_2018_idioms, warnings)] #![deny(clippy::all, clippy::pedantic)] #![allow(clippy::similar_names)] use std::borrow::Cow; use std::convert::TryInto; use std::io; use std::path::{Path, PathBuf}; use std::process; use chrono::{DateTime, Duration, Local}; use c...
#[cfg(not(windows))] extern crate cc; #[cfg(target_env = "msvc")] extern crate libc; #[cfg(target_env = "msvc")] extern crate vcpkg; extern crate libflate; extern crate pkg_config; extern crate tar; use std::{ env, path::{Path, PathBuf}, }; static VERSION: &'static str = "1.0.18"; fn main() { println!(...
//! Interfaces for hashing multiple inputs at once, using SIMD more //! efficiently. //! //! The throughput of these interfaces is comparable to BLAKE2sp, much larger //! than that of regular BLAKE2s when AVX2 is available. //! //! These interfaces can accept any number of inputs, and the implementation //! does its be...
// Copyright 2021 Datafuse Labs. // // 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 ...
mod sql; mod table; use crate::table::{ConsumeInfoTable, InUpdate}; use common::{async_trait, Result}; use core_storage::relational::table::{ BlockTable, CanonicalChainTable, CellTable, IndexerCellTable, SyncStatus, TransactionTable, IO_TYPE_INPUT, IO_TYPE_OUTPUT, }; use core_storage::relational::{generate_id...
use crate::{ data::{AudioConfig, AudioDeviceId}, prelude::*, sockets::{StreamReceiver, StreamSender, AUDIO}, }; use cpal::{ traits::{DeviceTrait, HostTrait, StreamTrait}, BufferSize, Device, Sample, SampleFormat, StreamConfig, }; use parking_lot::Mutex; use rodio::{OutputStream, Source}; use serde::...
/* * Copyright 2018 Intel Corporation * * 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 agre...
// TODO?: Should the Kernel terms be dropped in favor of terms like "text // macro", "form macro", and "constructor" instead? Those terms are probably // more familiar for a language focused on textual syntax, vs. the Kernel terms // which require an analogy between expression-form evaluation and // extensible-parsing...
use std::collections::HashMap; use std::process::Command; use std::sync::{Arc, RwLock}; use std::time::{Duration, Instant}; use serde::Serialize; use serde_json::Value; use bitcoin::{BlockHash, BlockHeader, Network, OutPoint, Transaction, Txid}; use bitcoin_hashes::hex::FromHex; use bitcoincore_rpc::{json as rpcjson,...
// MIT License // Copyright (c) 2018-2021 The orion Developers // 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, cop...
/* Copyright 2018 Mozilla Foundation * * 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...
use std::convert::TryInto; use std::fmt; use std::io::{self, BufRead, BufReader, Read, Seek, SeekFrom}; use thiserror::Error; /// This is a simple ELF64 file parser that makes it easy to extract sections #[derive(Debug)] pub struct ElfParser<R> { reader: BufReader<R>, header: Header, program_headers: Vec<...
//! multipart/form-data use std::borrow::Cow; use std::fmt; use http::HeaderMap; use mime_guess::Mime; use percent_encoding::{self, AsciiSet, NON_ALPHANUMERIC}; use uuid::Uuid; use futures_util::StreamExt; use super::Body; /// An async multipart/form-data request. pub struct Form { inner: FormParts<Part>, } //...
//! esp-idf source and tools installation. //! //! This module enables discovering existing `esp-idf` installation 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: //! - **`~/.espressif`** //! //! ...
// Copyright (c) The Dijets Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::cfg::BlockCFG; use crate::{ expansion::ast::{Address, Value, Value_}, hlir::ast::{Command, Command_, Exp, ExpListItem, UnannotatedExp_}, naming::ast::{BuiltinTypeName, BuiltinTypeName_}, parser::ast::{BinOp,...
mod lease_blob_options; pub use self::lease_blob_options::{LeaseBlobOptions, LEASE_BLOB_OPTIONS_DEFAULT}; //mod blob_stream_builder; //pub use self::blob_stream_builder::BlobStreamBuilder; mod blob_block_type; pub use self::blob_block_type::BlobBlockType; //mod list_blob_stream_builder; //pub use self::list_blob_stream...
extern crate rand; use amcl_wrapper::constants::MODBYTES; use amcl_wrapper::errors::SerzDeserzError; use amcl_wrapper::field_elem::FieldElement; use amcl_wrapper::group_elem::GroupElement; use amcl_wrapper::group_elem_g1::G1; use rand::rngs::EntropyRng; use rand::RngCore; #[derive(Debug, Clone, Copy)] pub enum MuSigE...
// src/lib.rs // external libraries pub mod aliases; pub mod math; pub mod ppm; extern crate rand; use std::fs::File; use std::io::Write; use std::thread::{spawn}; use std::sync::mpsc::{Sender, channel}; use self::rand::Rng; use self::rand::rngs::ThreadRng; pub use math::*; pub use aliases::*; pub use ppm::*; ...
//! Generates code to compare values using a comparison function. use llvm_sys; use std::ffi::CStr; use crate::ast::BinOpKind::*; use crate::ast::ScalarKind::I64; use crate::ast::Type; use crate::codegen::llvm2::numeric::gen_binop; use crate::codegen::llvm2::SIR_FUNC_CALL_CONV; use crate::error::*; use crate::sir::F...
//! Module for the initial processing of the macro tokens, to return an SM AST use crate::ast::{ Extras, Invariant, Lemma, LemmaPurpose, LemmaPurposeKind, ShardableType, Transition, SM, }; use crate::ident_visitor::validate_ident; use crate::parse_transition::parse_transition; use crate::to_token_stream::shardable...
// Copyright 2017 The Australian National University // // 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 applicab...
use std::fs; use std::fs::Metadata; use std::io::{Error, ErrorKind}; #[cfg(unix)] use std::os::unix::fs::MetadataExt; #[cfg(windows)] use std::os::windows::prelude::*; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex, Weak}; use std::thread; use std::time::{Instant, UNIX...
//! HAL library for CS (Clock System) - MSP432P401R /* +--------+-----------------------+---------------+-------------------------------------------------+ | Clock | Default Clock Source | Default Clock | Description | | +=======...
use super::common::*; use crate::circuit::mixer::MixerCircuit; use ark_crypto_primitives::Error; use ark_ec::PairingEngine; use ark_ff::{BigInteger, PrimeField}; use ark_std::{ rand::{CryptoRng, Rng, RngCore}, rc::Rc, vec::Vec, }; use arkworks_gadgets::{ arbitrary::mixer_data::Input as MixerDataInput, leaf::mixer:...
//! # About //! //! This crate provides bindings for `libmagic`, which recognizes the //! type of data contained in a file (or buffer). //! //! You might be similar with `libmagic`'s CLI `file`: //! //! ```sh //! $ file data/tests/rust-logo-128x128-blk.png //! data/tests/rust-logo-128x128-blk.png: PNG image data, 128 x...
//! We want to have a nice epub titlepage; //! but there's a bit of a problem. //! The state of epub rendering is such that //! it's not really possible to have a titlepage with even small details //! like a logo floated to the bottom. //! Instead, this crate lets us generate a svg. //! That presents its own problem; s...
#![allow(non_snake_case)] use clear_on_drop::clear::Clear; use curve25519_dalek::ristretto::{CompressedRistretto, RistrettoPoint}; use curve25519_dalek::scalar::Scalar; use curve25519_dalek::traits::MultiscalarMul; use merlin::Transcript; use super::{ConstraintSystem, LinearCombination, R1CSProof, Variable}; use err...
// libiio-sys/src/context.rs // // Copyright (c) 2018, <NAME> // // Licensed under the MIT license: // <LICENSE or http://opensource.org/licenses/MIT> // This file may not be copied, modified, or distributed except according // to those terms. // //! Industrial I/O Contexts. //! use crate::{cstring_opt, ffi, sys_res...
#[macro_use] extern crate vulkano; extern crate vulkano_win; extern crate vulkano_shaders; extern crate cgmath; extern crate winit; mod resources; use std::sync::Arc; use std::option::Option; use std::fmt; use std::error; use vulkano::buffer::{CpuAccessibleBuffer,BufferUsage}; use vulkano::device::{Device, Queue...
///! Implement a data structure that supports storing and retrieving file offsets by key. use std::convert::TryInto; use std::io::{self, Read}; use std::ops::Range; /// In how many bytes the bucket prefixes are stored. pub const BUCKET_PREFIX_SIZE: usize = 4; // Byte size of the file offset const FILE_OFFSET_BYTES: u...
//! Core language. use crate::env::{GlobalVar, LocalVar}; use crate::StringId; pub mod binary; pub mod semantics; /// Modules pub struct Module<'arena> { pub items: &'arena [Item<'arena>], } /// Top-level items pub enum Item<'arena> { /// Top-level definitions Definition { /// The label that ide...
use core::mem; use canadensis_core::TransferId; /// Toggle is set to 1 for the first frame in a transfer const TOGGLE_INIT: bool = true; /// Breaks a transfer payload into frames /// /// This does not account for CAN FD data length granularity limitations. It does not insert /// any padding before the tail byte. ///...
// 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...
//! `ProcessManager` allows the orchestration of processes. Each process is //! given a unique, user-defined identifier when calling `start_process()`. //! Running processes can be killed using `kill_process()`. Output lines that //! are printed on stdout or stderr are turned into corresponding events. The //! events c...
#![allow(clippy::float_cmp)] extern crate rand; mod aabb; mod aarect; mod bvh; mod camera; mod cbox; mod hittablelist; mod material; mod object; mod onb; mod oneweekend; mod pdf; mod perlin; mod ray; mod sphere; mod texture; const AUTHOR: &str = "jlhsmall"; mod vec3; pub use aarect::{XYRect, XZRect, YZRect}; pub use bv...
// // Copyright 2020, Gobsmacked Labs, 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...
use num_cpus; use std::cmp::{max, min}; use std::default::Default; use std::ops::Deref; use crate::gc::M; use crate::gc::{DEFAULT_CODE_SPACE_LIMIT, DEFAULT_PERM_SPACE_LIMIT}; // Write the Docopt usage string. static USAGE: &'static str = " Usage: dora test [options] [<file>] dora [options] <file> [--] [<argum...
use std::f32; use std::fmt::Debug; use std::mem; use crate::bsdf::{BxDF, BxDFType, MicrofacetDistribution}; use crate::clamp; use crate::geometry::*; use crate::material::TransportMode; use crate::sampling::cosine_sample_hemisphere; use crate::spectrum::Spectrum; use crate::{Point2f, Vector3f, ONE_MINUS_EPSILON}; ///...
//! N3-rust implementations of the RDF/JS core data types //! See http://rdf.js.org/data-model-spec/#data-interfaces use core::convert::TryFrom; use super::iri; use heapless::String; use heapless::consts::{U0, U32, U46, U47}; pub struct NamedNode; pub struct Literal; pub struct BlankNode; pub struct Variab...
/* Copyright 2021 Integritee AG and 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 or...
// Copyright 2015 <NAME>. See the COPYRIGHT // file at the top-level directory of this distribution. use std::borrow::Cow; use std::collections::{BTreeMap, BTreeSet}; use std::ops::Deref; use std::path::Path; use std::time::{Duration, SystemTime}; use minidump::{self, *}; use crate::arg_recovery; use crate::evil; us...
// This file contains a fixed point math implementation of the vector // graphics rasterizer. use super::{clamp, Rasterizer}; // ϕ is the number of binary digits after the fixed point. // // For example, if ϕ == 10 (and int1ϕ is based on the int32 type) then we // are using 22.10 fixed point math. // // When changing...
use anyhow::bail; use anyhow::Context; use anyhow::Result; use capstone as cs; use capstone::arch::BuildsCapstone; use colored::*; use goblin::elf::sym::STT_FUNC; use itertools::Itertools; use lexopt::prelude::*; use rayon::prelude::*; use std::cell::RefCell; use std::collections::HashSet; use std::sync::atomic::Atomic...
//! Additional AST nodes for the common UniTerm syntax (see RFC002 for more details). use super::*; use error::ParseError; use utils::{build_record, elaborate_field_path, FieldPath, FieldPathElem}; use crate::{ position::{RawSpan, TermPos}, term::{Contract, MergePriority, MetaValue, RecordAttrs, RichTerm, Shar...
//! This library is not affiliated with the NHS, Public Health England, or the UK Government. This is an unofficial project to provide Rust bindings for the NHS COVID-19 API. //! //! This library provides interfaces with the NHS 'Coronavirus (COVID-19) in the UK' data APIs, provided by [gov.uk](https://coronavirus.data...
use super::invoke_wasm_and_catch_traps; use crate::{ExternRef, Func, Store, Trap, ValType}; use anyhow::{bail, Result}; use std::marker; use std::mem::{self, MaybeUninit}; use std::ptr; use wasmtime_runtime::{VMContext, VMFunctionBody, VMTrampoline}; /// A statically typed WebAssembly function. /// /// Values of this ...
extern crate serde_cbor; extern crate xattr; use std::backtrace::Backtrace; use std::convert::TryInto; use std::ffi::OsString; use std::fs; use std::io; use std::io::{Read, Seek}; use std::mem; use std::os::unix::fs::{FileTypeExt, MetadataExt}; use std::path::Path; use std::vec::Vec; use nix::sys::stat; use serde::de...
//! A backend for the database based on csv files. use crate::backend_memory::BackendMemory; use std::path::PathBuf; use crate::{DatabaseTransaction, BulletinBoardBackend}; use csv::{WriterBuilder, ReaderBuilder, StringRecord}; use std::io::{Write, Read}; use crate::hash_history::{HashSource, HashInfo, Timestamp, Leaf...
// This file is part of Acala. // Copyright (C) 2020-2021 Acala Foundation. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // This program 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 Fou...
// 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. mod merge; use { crate::{ lsm_tree::{ skip_list_layer::SkipListLayer, types::{ BoxedLayerIterator, Ite...
// Copyright 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-MIT or ...
#![allow(clippy::borrow_interior_mutable_const)] #![allow(clippy::useless_conversion)] #![allow(clippy::wrong_self_convention)] #[macro_use] extern crate serde; pub mod api_version { include!("./api_version.rs"); } pub mod body_route_put_problem_problems_problem_id_put { include!("./body_route_put_problem_pr...
// 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 Follow 2018 idioms #![allow(elided_lifetimes_in_paths)] use failure::{format_err, Error, ResultExt}; use log::{error, info, LevelFilter}; use std:...
//! Logic for rendering the different hover messages use either::Either; use hir::{AsAssocItem, HasAttrs, HasSource, HirDisplay, Semantics, TypeInfo}; use ide_db::{ base_db::SourceDatabase, defs::Definition, helpers::{ generated_lints::{CLIPPY_LINTS, DEFAULT_LINTS, FEATURES}, FamousDefs, ...
use bevy::{ app::{Events, ManualEventReader}, ecs::schedule::SystemSet, input::mouse::{MouseMotion, MouseWheel}, prelude::*, render::{ camera::Camera, camera::CameraProjection, camera::{ActiveCameras, PerspectiveProjection}, render_graph::base::camera::CAMERA_3D, ...
use std::{fmt::Debug, fs, net::Ipv4Addr, path::PathBuf, process::exit}; use crate::{storage_helper::StorageHelper, seeds::SeedAddresses}; use diem_config::{ config::OnDiskStorageConfig, config::SafetyRulesService, config::{ DiscoveryMethod, NetworkConfig, NodeConfig, Peer, PeerRole, PeerSet, RoleTy...
use std::collections::{HashMap, hash_map::Entry}; use std::fmt; use serde::{Serialize, Deserialize, Deserializer, Serializer, de::{self, Visitor}}; use crate::{Border, Point}; #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct ThemeDefinition { #[serde(default)] pub fonts: ...
extern crate futures; extern crate indy_sys; use indy::{IndyError, ErrorCode}; use indy::ledger; use indy_utils::crypto::hash::hash; use self::futures::Future; use self::indy_sys::ledger::{CustomTransactionParser, CustomFree, indy_register_transaction_parser_for_sp}; use crate::utils::{timeout, anoncreds, blob_storag...
//! Universal format specification. //! Applicable to textures, views, and vertex buffers. //TODO: // DXT 1-5, BC7 // ETC2_RGB, // Use the EXT2 algorithm on 3 components. // ETC2_SRGB, // Use the EXT2 algorithm on 4 components (RGBA) in the sRGB color space. // ETC2_EAC_RGBA8, // Use the EXT2 EAC algorithm on 4 co...
use parking_lot::MutexGuard; use std::fmt; use crate::ctxt::get_vm; use crate::gc::root::Slot; use crate::gc::space::Space; use crate::gc::swiper::card::{CardEntry, CardTable}; use crate::gc::swiper::crossing::{CrossingEntry, CrossingMap}; use crate::gc::swiper::large::LargeSpace; use crate::gc::swiper::old::{OldGen, ...
use super::conversion_type::ConversionType; use crate::{ analysis::{record_type::RecordType, ref_mode::RefMode, try_from_glib::TryFromGlib}, config::functions::{CallbackParameter, CallbackParameters}, env::Env, library::{self, Nullable, ParameterDirection, ParameterScope}, nameutil::{is_gstring, use...
use std::{collections::HashMap, ops::Range, ptr::NonNull}; use crate::{ allocator::{Allocator, Kind}, block::Block, mapping::*, memory::*, util::*, }; /// Memory block allocated from `DynamicAllocator` #[derive(derivative::Derivative)] #[derivative(Debug)] pub struct DynamicBlock<B: gfx_hal::Backe...
// Copyright (C) 2017-2018 Baidu, Inc. All Rights Reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of source code must retain the above copyright // notice, this list of condit...
use crate::{ error::{Error, StateChannelError}, gateway, hash_str, router::{QuePacket, RouterStore, StateChannelEntry}, service::gateway::{GatewayService, StateChannelFollowService}, service::router::{RouterService, StateChannelService}, state_channel::{ check_active, StateChannelCausali...
// Copyright (c) The Starcoin Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::structured_log::disable_slog_stderr; use anyhow::{format_err, Result}; use log::LevelFilter; use log4rs::{ append::{ console::{ConsoleAppender, Target}, rolling_file::policy::compound::{ ro...
use std::cmp::Reverse; use super::script::Script; use crate::utils::is_stop_char; type ScriptCounter = (Script, fn(char) -> bool, usize); /// Detect only a script by a given text. /// Works much faster than a complete detection with `detect`. /// /// # Example /// ``` /// use whatlang::{detect_script, Script}; /// l...
// Copyright (c) 2018-2020 Ministerio de Fomento // Instituto de Ciencias de la Construcción Eduardo Torroja (IETcc-CSIC) // 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 ...
//! Image writer use core::{cmp, ops::Range}; use std::io::{self, Write}; use anyhow::format_err; use xmas_elf::{ program::{SegmentData, Type}, sections::SectionData, symbol_table::Entry as _, ElfFile, }; use crate::{ dcd::{self, AddressValue}, ivt, BootData, Ivt, }; /// ROM bootloader limit...
#![allow(clippy::mutable_key_type)] use crate::cancel_challenge::LoadDataStrategy; use anyhow::{anyhow, bail, Result}; use ckb_chain_spec::consensus::MAX_BLOCK_BYTES; use gw_common::H256; use gw_config::{BlockProducerConfig, DebugConfig, OffChainValidatorConfig}; use gw_poa::PoA; use gw_rpc_client::rpc_client::RPCCli...
//! API for Direct Memory Access (DMA) //! //! The DMA controller is described in the user manual, chapter 12. use core::ptr; use core::sync::atomic::{compiler_fence, Ordering}; use nb; use crate::{ init_state, pac::{ self, dma0::{ channel::{CFG, XFERCFG}, ACTIVE0, ENA...
//! Ported to Rust from <https://www.shadertoy.com/view/MlfGR4> //! //! Original comment: //! ```glsl //! /////////////////////////////////////////////////////////////////////////////// //! // // //! // GGGG IIIII AAA N N TTTTT PPPP AA...
use anyhow::{self, Context, Result}; use flate2::read::GzDecoder; use log::{debug, info, warn}; use serde::{Deserialize, Serialize}; use std::cfg; use std::collections::{HashMap, HashSet}; use std::fs; use std::io::Write; use std::iter::Iterator; use std::path::{Path, PathBuf}; use std::process::Command; use tar::Archi...
// Copyright (C) 2017 1aim GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
use std::borrow::Cow; use std::collections::HashMap; use std::convert::TryInto; use std::convert::TryFrom; use std::fs::File; use std::io::Read; use std::io::Seek; use std::io::SeekFrom; use std::ops::Range; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::{fmt, io}; use bytes::Bytes; use crate::wad::par...
//! Install any hooks, aliases, etc. to set up `git-branchless` in this repo. use std::fmt::Write; use std::io::{stdin, stdout, BufRead, BufReader, Write as WriteIo}; use std::path::{Path, PathBuf}; use console::style; use eyre::Context; use path_slash::PathExt; use tracing::{instrument, warn}; use crate::core::conf...
use std::ops::Range; use crate::debug_info; use crate::llvm::{self, Bool, True, Type, Value}; use libc::{c_char, c_uint}; use rustc_codegen_ssa::traits::{ BaseTypeMethods, ConstMethods, DerivedTypeMethods, MiscMethods, StaticMethods, }; use rustc_hir::def_id::DefId; use rustc_middle::mir::interpret::{ read_tar...
#[macro_use] extern crate log; #[macro_use] extern crate failure; #[macro_use] extern crate lazy_static; #[macro_use] extern crate bitflags; extern crate image; extern crate simple_logger; extern crate phf; extern crate piston_window; extern crate rand; extern crate fps_counter; mod nes; use std::env; use crate::nes:...
extern crate rpassword; use clap::{crate_version, App, Arg, ArgMatches, Shell}; use log::*; use std::str::FromStr; use std::{ io::{stdout, Write}, path::Path, sync::{Arc, Mutex}, }; use steamguard::{ steamapi, AccountLinkError, AccountLinker, Confirmation, FinalizeLinkError, LoginError, SteamGuardAccount, UserLogi...
//! This example shows how you can use `rillrate` to create a web dashboard for your bot! //! //! This example is considered advanced and requires the knowledge of other examples. //! Example 5 is needed for the Gateway latency and Framework usage. //! Example 7 is needed because tracing is being used. //! Example 12 i...
// بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم // This file is part of Setheum. // Copyright (C) 2019-2021 <NAME>. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publ...
impl_var!( /// Internet address families pub Af, libc::c_uchar, Inet => libc::AF_INET as libc::c_uchar, Inet6 => libc::AF_INET6 as libc::c_uchar ); impl_var!( /// General address families for sockets pub RtAddrFamily, u8, Unspecified => libc::AF_UNSPEC as u8, UnixOrLocal => libc::AF_UNI...
#![recursion_limit = "256"] mod cli; mod client; mod config; mod state; mod tutorial; use crate::config::{ ShellConfig, DEFAULT_ANALYTICS_TIMEOUT, DEFAULT_DATA_TIMEOUT, DEFAULT_KV_BATCH_SIZE, DEFAULT_MANAGEMENT_TIMEOUT, DEFAULT_QUERY_TIMEOUT, DEFAULT_SEARCH_TIMEOUT, }; use crate::state::{RemoteCloud, RemoteCl...
// The MIT License (MIT) // // Copyright (c) 2015 <NAME> <<EMAIL>> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use...
#![allow(dead_code)] #[allow(unused_imports)] use rimd::{ MidiMessage, SMFBuilder, SMFError, SMFFormat, SMFWriter, Track, TrackEvent, SMF, }; use std::thread; //use std::rc::Rc; use std::sync::{Arc, Mutex}; use std::path::Path; use std::time::Instant; mod replacing_fns; mod checking_fns; mod composite_fns; mod...