text
stringlengths
9.08k
47.9k
use reqwest; use scraper::{Html, Selector}; use std::collections::HashSet; use crate::solr::WebsiteSolr; use crate::solr::update_metadata; use crate::solr::update_ext_links; use crate::solr::req; use crate::db::DB; use crate::db::Website; use crate::db::Metadata; use crate::db::ExternalLink; use crate::db::WebsiteRef...
/*! This library provides types for usage with unstructured data. This is based on functionality from both [serde_json](https://github.com/serde-rs/json) and [serde_value](https://github.com/arcnmx/serde-value). Depending on your use case, it may make sense to use one of those instead. These structures for serializati...
//! A const evaluated sha1 function. //! //! # Use //! //! ``` //! const fn signature() -> const_sha1::Digest { //! const_sha1::sha1(&const_sha1::ConstBuffer::from_slice(stringify!(MyType).as_bytes())) //! } //! ``` #![forbid(unsafe_code)] #![deny(missing_docs)] /// A const evaluated sha1 function. /// /// # Use ...
//! On the fly HLS / DASH packaging. //! use std::cmp; use std::collections::{HashMap, HashSet}; use std::fmt::Display; use std::fmt::Write; use std::fs; use std::io; use std::ops::Range; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::time::Duration; use once_cell::sync::Lazy; use percent_encoding::{utf8...
use std::fmt; macro_rules! make_brick_color { ({ $([ $enum: ident, $name: expr, $value: expr, ($color3_r: expr, $color3_g: expr, $color3_b: expr) ],)+ }) => { /// BrickColor values were the old, palette-based system of defining ///...
/* * Client Portal Web API * * Client Portal Web API * * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct InlineResponse20029 { #[serde(rename = "accountready", skip_serializing_if = "Opt...
use crate::buf::{BufCache, BufCacheHandler}; use crate::constants::*; use crate::once::Once; use crate::pmap::VirtAddr; use crate::rwlock::{RwLock, RwLockWriteGuard}; use crate::spinlock::Mutex; use crate::superblock::SuperBlock; use crate::{buf, device, env, log, superblock, util}; use alloc::boxed::Box; use alloc::co...
// Copyright (c) 2019 Cloudflare, Inc. All rights reserved. // SPDX-License-Identifier: BSD-3-Clause pub mod allowed_ips; pub mod api; mod dev_lock; pub mod drop_privileges; #[cfg(test)] mod integration_tests; pub mod peer; #[cfg(any(target_os = "macos", target_os = "ios"))] #[path = "kqueue.rs"] pub mod poll; #[cfg...
use super::{ guard::{ReadGuard, Removed}, insertion::Inserter, }; use incin::{Incinerator, Pause}; use owned_alloc::OwnedAlloc; use ptr::non_zero_null; use std::{ borrow::Borrow, cmp::Ordering, fmt, mem, ptr::{null_mut, NonNull}, sync::{ atomic::{AtomicPtr, Ordering::*}, ...
use std::{collections::HashSet, pin::Pin, sync::Arc, time::Duration}; use color_eyre::eyre::{eyre, Report}; use futures::{ future::FutureExt, stream::{FuturesUnordered, StreamExt}, }; use tokio::time::sleep; use tower::{ builder::ServiceBuilder, hedge::Hedge, limit::ConcurrencyLimit, retry::Retry, timeout:...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 16usize], #[doc = "0x10 - SysTick Control and Status Register"] pub syst_csr: SYST_CSR, #[doc = "0x14 - SysTick Reload Value Register"] pub syst_rvr: SYST_RVR, #[doc = "0x18 - SysTick Current Value Register"] p...
//! The main parser module. //! It has a Parser struct //! which constructs AST nodes //! given a lexer. use super::lexer::{self, Token}; pub mod ast; use std::error::Error; use std::{fmt, mem, result}; // I would **NOT** use this to learn how to make a parser. // Just saying. // Silly result alias. type Result<T> = ...
use crate::context::SharedContext; use arrayvec::ArrayVec; use imgui::Ui; use notify::{DebouncedEvent, RecommendedWatcher, RecursiveMode, Watcher}; use spark::{vk, Builder, Device}; use std::{ cell::RefCell, collections::HashMap, convert::TryInto, ffi::CStr, fs::File, io::{self, prelude::*}, ...
use fnv::{FnvHashMap, FnvHashSet}; use float_ord::FloatOrd; use rayon::prelude::*; use std::path::Path; use tri_mesh::prelude::*; use combination::combine; use bvh::bvh::BVH; use bvh::ray::Ray; use bvh::nalgebra::{Point3 as NPoint3, Vector3 as NVec3}; use crate::material_mesh::{Axis, MaterialID, MaterialMesh, BvhTrian...
#![allow(non_upper_case_globals)] #[macro_use] extern crate bitfield; use std::ffi::c_void; use std::ptr::null_mut; use std::sync::atomic::AtomicUsize; use atomic::Ordering; use spin::Mutex; use crate::alloc::{get_page_info_for_ptr, register_desc, unregister_desc, update_page_map}; use crate::allocation_data::{Anch...
#![windows_subsystem = "windows"] use iced::{button, container, slider, pick_list, Container, Align, Length, HorizontalAlignment, VerticalAlignment, Background, Button, Slider, PickList, Row, Column, Element, Sandbox, Settings, Text, Image}; use chess::{Board, BoardStatus, ChessMove, Color, Piece, Rank, Square, File}...
use std::{cmp::Ordering, fmt::Write}; use bellframe::{ music::{Elem, Pattern}, Bell, RowBuf, Stage, }; use itertools::Itertools; use monument::{ music::{MusicType, StrokeSet}, MusicTypeVec, OptRange, }; use serde::Deserialize; use crate::utils::OptRangeInclusive; #[derive(Debug, Clone, Copy, Deserial...
//! Configuration for the gui portion of the terminal use crate::create_user_owned_dirs; use crate::font::FontSystemSelection; use crate::frontend::FrontEndSelection; use crate::keyassignment::{KeyAssignment, SpawnTabDomain}; use failure::{bail, err_msg, format_err, Error, Fallible}; use lazy_static::lazy_static; use ...
use crate::{BindingsList, NativeCapability, RouteKey}; use crate::{Invocation, InvocationResponse, Result}; use crossbeam::{Receiver, Sender}; use crossbeam_channel as channel; use latticeclient::{ controlplane::{ LaunchAck, LaunchAuctionRequest, LaunchAuctionResponse, LaunchCommand, ProviderLaunchAck, ...
use std::collections::{BinaryHeap, BTreeMap, BTreeSet, HashMap}; use std::sync::{Arc, Mutex}; use std::sync::atomic::{AtomicBool, Ordering}; use graphics::{Line, Rectangle, Transformed}; use graphics::math::identity; use graphics::rectangle::square; use serde::{Deserialize, Serialize}; use crate::bot::map::{Grid, gri...
use super::point::Point; use super::LineSegment; use super::QuadraticBezier; use super::*; /// A 2d cubic Bezier curve defined by four points: the starting point, two successive /// control points and the ending point. /// The curve is defined by equation: /// ```∀ t ∈ [0..1], P(t) = (1 - t)³ * start + 3 * (1 - t)² ...
mod drop_privs; mod handle_message; mod kex; mod metacommands; mod restrict_message; mod socks; use arg; use message::OxyMessage::{self, *}; #[cfg(unix)] use pty::Pty; use shlex; use std::{ cell::RefCell, collections::HashMap, fs::File, io::Read, rc::Rc, time::{Duration, Instant}, }; use transp...
use crate::database::secs_since_unix_epoch; use crate::database::struct_tools::client_to_new_db_client; use crate::database::ONE_DAY; use exit_db::models::AssignedIps; use ipaddress::IPAddress; use ipnetwork::IpNetwork; use rita_common::utils::ip_increment::increment; use crate::{RitaExitError, DB_POOL}; use althea_ke...
#![allow(unused_mut, dead_code)] const IV: [u32; 8] = [ 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19, ]; // Table 3: Admissible values for input d in the BLAKE3 compression function. // ------------------ ------ // Flag name Value // -------...
//! Custom handling of dropping for the heap-allocated `Datum` types of this //! crate. Enables using very-deep `Datum` trees, e.g. long lists, which would //! otherwise cause stack overflows when droppped (due to the compiler's //! automatic recursive dropping). Can also be used for any other `Datum` //! reference t...
use crate::dist::download::DownloadCfg; use crate::dist::manifest::Component; use crate::dist::manifest::Manifest as ManifestV2; use crate::dist::manifestation::{Changes, Manifestation, UpdateStatus}; use crate::dist::notifications::*; use crate::dist::prefix::InstallPrefix; use crate::dist::temp; use crate::errors::*;...
use bytemuck::{Pod, Zeroable}; use cgmath::{Matrix4, Quaternion}; use std::{borrow::Cow, mem::size_of}; use wgpu::util::DeviceExt; use winit::{ event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::Window, }; #[repr(C)] #[derive(Debug, Copy, Clone, Pod, Zeroable)] struct Matrix { _...
// Miniscript // Written in 2019 by // <NAME> <<EMAIL>> // // To the extent possible under law, the author(s) have dedicated all // copyright and related and neighboring rights to this software to // the public domain worldwide. This software is distributed without // any warranty. // // You should have received a ...
use alloc::vec::Vec; use core::cmp; use core::convert::TryFrom; use core::iter::ExactSizeIterator; use core::ops::Range; use core::ptr::NonNull; use core::sync::atomic::{AtomicI64, Ordering}; use core::{fmt, mem}; #[cfg(feature = "std")] use std::error::Error; use std::num::{NonZeroU32, NonZeroU64}; /// Lightweight un...
use rustc_ast as ast; use rustc_ast::ptr::P; use rustc_ast::token; use rustc_ast::tokenstream::TokenStream; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_errors::{Applicability, DiagnosticBuilder}; use rustc_expand::base::{self, *}; use rustc_parse::parser::Parser; use rustc_parse_format as parse; us...
// Copyright 2019 Mozilla Foundation. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your // ...
use crate::cx::*; #[derive(Clone)] pub struct ViewTexture { sample_count: usize, has_depth_stencil: bool, fixed_size: Option<Vec2> } pub type ViewRedraw = Result<(), ()>; #[derive(Debug, Clone)] pub struct View { // draw info per UI element pub view_id: Option<usize>, pub redraw_id: u64, pub ...
use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use std::cmp::Ordering; use std::fmt; use std::hash::{Hash, Hasher}; use std::mem::discriminant; use std::num::FpCategory; use std::ops::{Add, Div, Mul, Rem, Sub}; #[derive(Copy, Clone, Debug, Deserialize, Serialize)] pub enum Numeric { Integer(i6...
// LNP Node: node running lightning network protocol and generalized lightning // channels. // Written in 2020 by // Dr. <NAME> <<EMAIL>> // // To the extent possible under law, the author(s) have dedicated all // copyright and related and neighboring rights to this software to // the public domain worldwide. This ...
use druid::{Data, Lens, Point}; use std::path::PathBuf; use std::time::Instant; use scribl_curves::{DrawSnippet, DrawSnippetId, StrokeInProgress, StrokeSeq, Time, TimeDiff}; use crate::audio::{TalkSnippetId, TalkSnippets}; use crate::config::Config; use crate::data::{DenoiseSetting, ScriblState, Settings}; use crate:...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved_0_ssar: [u8; 0x04], #[doc = "0x04 - Block Size"] pub bsr: crate::Reg<bsr::BSR_SPEC>, #[doc = "0x06 - Block Count"] pub bcr: crate::Reg<bcr::BCR_SPEC>, #[doc = "0x08 - Argument 1"] pub arg1r: crate::Reg<arg1r::ARG1R_SP...
//! Transformation for wasm-bindgen to enable usage of `anyref` in a wasm //! module. //! //! This crate is in charge of enabling code using `wasm-bindgen` to use the //! `anyref` type inside of the wasm module. This transformation pass primarily //! wraps exports and imports in shims which use `anyref`, but quickly tu...
//! Server implementation for the HTTP/3 protocol //! //! # Overview //! //! Simply build a new server endpoint with [`Builder::default()`], the only required configuration //! is the [`certificate`]. Calling [`Builder::build()`] will bind a `UDP` socket listening on //! `0.0.0.0:443` and return a [`Stream`] of [`Incom...
//! Inter-Process Multiple Producer, Single Consumer Channels for Rust //! //! This library provides a type-safe, high-performance inter-process channel implementation based on a shared //! memory ring buffer. It uses [bincode](https://github.com/TyOverby/bincode) for (de)serialization, including //! zero-copy deseria...
use adnl::{ common::{KeyId, KeyOption, Query, tag_from_boxed_type, TaggedTlObject, Wait}, node::{AdnlNode, AddressCache} }; use crate::engine::STATSD; use dht::DhtNode; use overlay::{OverlayShortId, OverlayNode}; use rand::{Rng}; use std::{ cmp::Ordering, time::{Duration, Instant}, sync::Arc, sync::ato...
pub mod misc_section; use crate::script; use crate::script::Script; use crate::util; use crate::wii_memory::WiiMemory; use misc_section::MiscSection; use fancy_slice::FancySlice; #[rustfmt::skip] pub(crate) fn arc_fighter_data(parent_data: FancySlice, data: FancySlice, wii_memory: &WiiMemory) -> ArcFighterData { ...
//! Support for the Inter-Integrated Circuit (I2C) bus peripheral. Also supports SMBUS. //! Provides APIs to configure, read, and write from //! I2C, with blocking, nonblocking, and DMA functionality. use cast::{u16, u8}; use core::ops::Deref; use cortex_m::interrupt::free; #[cfg(feature = "embedded-hal")] use embed...
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MI...
use crate::engine::{ ExecutionContext, InitializedVectorOperator, OperatorDatasets, ResultDescriptor, SourceOperator, TypedVectorQueryProcessor, VectorOperator, VectorQueryProcessor, VectorResultDescriptor, }; use crate::engine::{QueryContext, VectorQueryRectangle}; use crate::util::Result; use async_trait:...
extern crate libc; use libc::{c_int, c_char}; #[link(name = "lept")] extern { pub fn pixRead(filename: *const libc::c_char) -> *mut PIX; } #[link(name = "tesseract")] extern { pub fn TessVersion() -> *const libc::c_char; pub fn TessDeleteText(text: *const libc::c_char); pub fn TessDeleteTextArray(arr:...
// 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. #![allow(dead_code)] use crate::storage::UpdateState; use anyhow::{format_err, Context, Error}; use fidl::encoding::{decode_persistent, encode_persistent,...
use mkv::elements::parser::Parser as _; use std::{collections::VecDeque, convert::TryInto, io::Read}; #[derive(gumdrop::Options)] struct Opts { #[options(no_help_flag)] help: bool, #[options(default = "1")] threads: usize, } struct MessageToVideoDecoder { pts: f64, buf: Vec<u8>, width: u3...
// Take a look at the license at the top of the repository in the LICENSE file. use crate::{DiskUsage, Pid, ProcessExt, ProcessStatus, Signal}; use std::ffi::OsString; use std::fmt; use std::mem::{size_of, zeroed, MaybeUninit}; use std::ops::Deref; use std::os::windows::ffi::OsStringExt; use std::os::windows::process...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This crate provides [`LibraDB`] which represents physical storage of the core Libra data //! structures. //! //! It relays read/write operations on the physical storage via [`schemadb`] to the underlying //! Key-Value storage syste...
//! Bluetooth Low Energy Advertising Driver //! //! A system call driver that exposes the Bluetooth Low Energy advertising //! channel. The driver generates a unique static address for each process, //! allowing each process to act as its own device and send or scan for //! advertisements. Timing of advertising or scan...
use std::fs::OpenOptions; use std::io::{Read, Write}; use std::os::unix::prelude::{IntoRawFd, OpenOptionsExt}; use std::os::unix::process::CommandExt; use std::path::PathBuf; use std::{ env, fs::File, os::unix::prelude::{FromRawFd, RawFd}, }; use crate::{console, devices, hermit, mounts}; use crate::{flags, paths, ...
// "asi_vulkan" crate - Licensed under the MIT LICENSE // * Copyright (c) 2017-2018 <NAME> <<EMAIL>> use ami::Parent; use { std, std::{ mem, ptr::{ null, null_mut }, ffi::CString } }; use c_void; use types::*; // Windows #[cfg(target_os = "windows")] const DL: &'static str = "vulkan-1.dll"; // Unix (Except MacOS)...
// Copyright 2020. The Tari Project // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the // following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following // disclai...
use std::{ cmp, collections::HashMap, hash::{BuildHasherDefault, Hash}, mem, num::NonZeroUsize, pin::Pin, task::{Context, Poll}, time::Duration, }; use futures::{ ready, stream::{Fuse, Stream, StreamExt}, }; use pin_project::pin_project; use tokio_util::time::{delay_queue::Key, ...
use crate::data::*; use crate::{calc_profile_duration, ControllerError, Delay}; use crate::{Bme680Sensor, BME680_CALIB_SIZE}; use embedded_hal::blocking::i2c::{Write, WriteRead}; use embedded_time::duration::Milliseconds; /// Processes measurement data. #[derive(Copy, Clone, Debug)] pub struct Data { pub tempera...
use crate::*; use crate::{ composite_collections::{SmallCompositeVec as CompositeVec, SmallStartLen as StartLen}, impl_interfacetype::impl_interfacetype_tokenizer, lifetimes::LifetimeIndex, literals_constructors::{rslice_tokenizer, rstr_tokenizer}, }; use as_derive_utils::{ datastructure::{DataStr...
//! This mod implements `kubernetes_logs` source. //! The scope of this source is to consume the log files that `kubelet` keeps //! at `/var/log/pods` at the host of the k8s node when `vector` itself is //! running inside the cluster as a `DaemonSet`. #![deny(missing_docs)] use std::{convert::TryInto, path::PathBuf, ...
//! [![crates.io version](https://img.shields.io/crates/v/deduposaur.svg)](https://crates.io/crates/deduposaur) //! [![license: Apache 2.0](https://raw.githubusercontent.com/mleonhard/deduposaur/main/license-apache-2.0.svg)](https://github.com/mleonhard/deduposaur/blob/main/LICENSE) //! [![unsafe forbidden](https://git...
use super::simple_sync::{PeerSyncInfo, FUTURE_SLOT_TOLERANCE}; use beacon_chain::{BeaconChain, BeaconChainTypes, BlockProcessingOutcome}; use eth2_libp2p::rpc::methods::*; use eth2_libp2p::rpc::RequestId; use eth2_libp2p::PeerId; use slog::{debug, info, trace, warn, Logger}; use std::collections::{HashMap, HashSet}; us...
use graphics_state::{GraphicsState, Height, Width}; use lyon::geom::Box2D; use lyon::lyon_tessellation::StrokeOptions; use lyon::math::*; use lyon::algorithms::path::math::Point; use lyon::path::PathEvent; use lyon::tessellation; use lyon::tessellation::geometry_builder::*; use lyon::tessellation::StrokeTessellator; u...
use crate::{InsertError, MatchError, Params}; use std::cell::UnsafeCell; use std::cmp::min; use std::mem; use std::str; /// A successful match consisting of the registered value and the URL parameters, returned by /// [`Node::at`](crate::Node::at). #[derive(Debug)] pub struct Match<'k, 'v, V> { /// The value stor...
//! //! WAL redo. This service runs PostgreSQL in a special wal_redo mode //! to apply given WAL records over an old page image and return new //! page image. //! //! We rely on Postgres to perform WAL redo for us. We launch a //! postgres process in special "wal redo" mode that's similar to //! single-user mode. We th...
use crossbeam_channel::{Receiver, Sender}; use once_cell::sync::OnceCell; use std::sync::atomic::{AtomicBool, Ordering}; use crate::buffer::AudioBuffer; use crate::context::{AsBaseAudioContext, AudioContextRegistration, AudioParamId}; use crate::control::Controller; use crate::param::{AudioParam, AudioParamOptions, Au...
use crate as _; // global logger + panicking-behavior + memory layout use aligned::{Aligned, A4}; use nrf_softdevice_s112 as sd; static BASE_UUID: sd::ble_uuid128_t = sd::ble_uuid128_t { uuid128: [ // 2 bytes set via ble_uuid_t.uuid (were 0x66, 0xf3)--------------------.-----. // ...
// Copyright 2020 <NAME> // SPDX-License-Identifier: Apache-2.0 use wasmlib::*; use crate::*; use crate::types::*; // Defining default configuration parameters // The default amount of players to tag an image for it to be considered processed const DEFAULT_TAGS_REQUIRED_PER_IMAGE: i32 = 10; // The distance required...
// Copyright 2016 The Fancy Regex Authors. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, p...
include!("constants_header.rs"); macro_rules! elf_header { ($size:ident) => { use core::fmt; #[repr(C)] #[derive(Clone, Copy, Default, PartialEq)] pub struct Header { /// Magic number and other info pub e_ident: [u8; SIZEOF_IDENT], /// Object fil...
//! A module for plotting graphs use std; use std::collections::HashMap; use crate::axis; use crate::repr; use crate::style; use crate::utils::PairWise; // Given a value like a tick label or a bin count, // calculate how far from the x-axis it should be plotted fn value_to_axis_cell_offset(value: f64, axis: &axis::C...
use crc_any::CRC; use itertools::Itertools; use libremarkable::appctx::ApplicationContext; use libremarkable::framebuffer::cgmath; use libremarkable::framebuffer::cgmath::EuclideanSpace; use libremarkable::framebuffer::common::*; use libremarkable::framebuffer::common::{DISPLAYHEIGHT, DISPLAYWIDTH}; use libremarkable::...
// Copyright (c) 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 ...
use std::cmp::min; use std::collections::{HashMap, HashSet}; use std::ffi::OsString; use std::fmt::Display; use std::fs::{self, create_dir_all, remove_dir_all, File}; use std::io::prelude::Write; use std::io::{BufReader, Error, ErrorKind, Read, Result, stdin}; use std::path::{Path, PathBuf}; use std::process::Command; ...
#![allow(clippy::needless_range_loop, dead_code)] use crate::symmetric::KeccakState; pub(crate) const SHAKE128_RATE: usize = 168; pub(crate) const SHAKE256_RATE: usize = 136; const SHA3_256_RATE: usize = 136; const SHA3_512_RATE: usize = 72; const NROUNDS: usize = 24; fn rol(a: u64, offset: u64) -> u64 { (a << of...
//! Package url parses URLs and implements query escaping. // #![allow(unused_assignments)] #![allow(unused)] // #![allow(dead_code)] #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(non_camel_case_types)] #[cfg(test)] mod tests; use crate::builtin::*; #[derive(Default, PartialEq, PartialOrd, Debu...
//! This is a lightly modified version of the `ggez-goodies` //! crate's `input.rs` module; please see the source for the //! license notification. //! //! An abstract input state object that gets fed user //! events and updates itself based on a set of key //! bindings. //! //! The goals are: //! //! * Have a layer of...
use std::collections::HashMap; use std::io; use anyhow::{Context, Error}; use chrono::{Date, Datelike, DateTime, MAX_DATE, MIN_DATE, Utc}; use clap::{App, ArgMatches, Shell}; use csv; use dirs; use path_abs::{PathAbs, PathDir, PathFile, PathInfo, PathOps}; use rand::Rng; use regex::Regex; use serde_json; use termion::...
use std::collections::BTreeMap; use std::fmt::Debug; use std::sync::mpsc::{Receiver, Sender}; use std::sync::Arc; use crate::shader::create_pipeline; use epi::egui; use epi::egui::{ClippedMesh, Color32, Texture, TextureId}; use crate::{RenderTarget, ScreenDescriptor}; use log::debug; use threadpool::ThreadPool; use v...
use std::cmp; use crate::ffi; use ttf_parser::{ GlyphPosSubTable, ScriptIndex, LanguageIndex, FeatureIndex, FeatureVariationIndex, LookupIndex, }; use crate::{Tag, Mask, SegmentProperties, Language}; const TAG_GSUB: Tag = Tag::from_bytes(b"GSUB"); const TAG_GPOS: Tag = Tag::from_bytes(b"GPOS"); const TABLE_...
// Copyright 2018 <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 ...
use derive_more::{Display, Error, IsVariant}; use serde::{Deserialize, Serialize}; use std::{io, num::ParseIntError, path::PathBuf, str::FromStr}; use strum::AsRefStr; /// Type alias for a vec of bytes /// /// NOTE: This only exists to support properly parsing a Vec<u8> from an entire string /// with structopt r...
extern crate clap; #[macro_use] extern crate failure; extern crate glib; #[macro_use] extern crate gstreamer as gst; extern crate gstreamer_sdp as gst_sdp; extern crate gstreamer_webrtc as gst_webrtc; extern crate rand; extern crate serde; #[macro_use] extern crate serde_derive; extern crate serde_json; extern crate to...
use crate::cfg_asm; use core::arch::{asm, global_asm}; // we could cfg symbols away and reduce frame size depending on features enabled // i.e the frame size is a fixed size based on all the features right now // we know at compile time if a target has loops for example, if it doesn't // we could cut that memory usage...
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // // Portions Copyright 2017 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the THIRD-PARTY file. use super::Error as D...
#![cfg_attr(not(feature = "std"), no_std)] /// Edit this file to define custom logic or remove it if it is not needed. /// Learn more about FRAME and the core library of Substrate FRAME pallets: /// <https://substrate.dev/docs/en/knowledgebase/runtime/frame> pub use pallet::*; use sp_std::{vec::Vec, convert::TryInto...
use std::{process::Command, sync::atomic::Ordering}; use crate::{shell::FullscreenSurface, AnvilState}; #[cfg(feature = "udev")] use crate::udev::UdevData; use smithay::{ backend::input::{ self, Event, InputBackend, InputEvent, KeyState, KeyboardKeyEvent, PointerAxisEvent, PointerButtonEvent, ...
use crate::containers::parameter_types::{PortMapping, Schema2HealthConfig}; use crate::pods::response_types::{ ErrIdResponse, InspectDevice, InspectHostPort, InspectMount, ListPodProcessesResponse, }; use crate::volumes::response_types::ErrIdSizeResponse; use serde::{Deserialize, Serialize}; use std::collections::H...
// Copyright (c) Facebook, Inc. and its affiliates // SPDX-License-Identifier: MIT OR Apache-2.0 use crate::Encoding; use maplit::btreemap; use serde::{Deserialize, Serialize}; use serde_bytes::ByteBuf; use serde_reflection::{Registry, Result, Samples, Tracer, TracerConfig}; use std::collections::BTreeMap; // Simple ...
use aurora_engine_types::account_id::AccountId; use borsh::{BorshDeserialize, BorshSerialize}; use near_primitives_core::config::VMConfig; use near_primitives_core::contract::ContractCode; use near_primitives_core::profile::ProfileData; use near_primitives_core::runtime::fees::RuntimeFeesConfig; use near_vm_logic::mock...
#[macro_use] extern crate clap; extern crate hashbrown; extern crate phasst_lib; extern crate disjoint_set; extern crate statrs; extern crate bio; use bio::io::fasta; use bio::utils::Text; use bio::io::fasta::Record; use std::path::Path; use disjoint_set::DisjointSet; use hashbrown::{HashMap, HashSet}; use phasst_l...
//! An trait defining architecture specific address spaces. use alloc::string::ToString; use alloc::vec::Vec; use core::cmp::PartialEq; use core::convert::TryInto; use core::fmt; use bit_vec::BitVec; use custom_error::custom_error; use kpi::SystemCallError; use x86::current::paging::{PDFlags, PDPTFlags, PTFlags}; us...
#![no_std] #![no_main] //#![deny(warnings)] #![feature(array_methods)] #![feature(const_option)] use cfg_if::cfg_if; use cortex_m::asm; use cortex_m::asm::delay; use cortex_m_rt::{entry, exception, ExceptionFrame}; mod peripherals; use peripherals::stm32p::*; use rtt_target::{rprintln, rtt_init_print}; use vhrd_flash_...
use winapi::shared::basetsd::{LONG_PTR, PSIZE_T, SIZE_T, ULONG_PTR}; use winapi::shared::ntdef::{ BOOLEAN, HANDLE, LARGE_INTEGER, LIST_ENTRY, LONG, LONGLONG, NTSTATUS, PANSI_STRING, PCSTR, PCUNICODE_STRING, PCWSTR, PHANDLE, POBJECT_ATTRIBUTES, PSINGLE_LIST_ENTRY, PSTR, PULONG, PUNICODE_STRING, PUSHORT, PVOI...
use alloc::{sync::Arc, vec, vec::Vec}; use core::{cell::RefCell, cmp}; use std::f32; use crate::byte_reader::ByteReader; use crate::{animation::HavokAnimation, object::HavokObject, transform::HavokTransform}; #[repr(u8)] #[allow(clippy::upper_case_acronyms)] enum RotationQuantization { POLAR32 = 0, THREECOMP4...
// Copyright 2017 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...
mod program_clauses; mod resolvent_ops; mod unify; use chalk_engine::fallible::Fallible; use chalk_engine::{ context, hh::HhGoal, DelayedLiteral, Literal, ExClause, }; use chalk_engine::forest::Forest; use rustc::infer::{InferCtxt, LateBoundRegionConversionTime}; use rustc::infer::canonical::{ ...
//! This module implements the `Node` structure, which composes the AST. pub mod array; pub mod await_expr; pub mod block; pub mod break_node; pub mod call; pub mod conditional; pub mod declaration; pub mod field; pub mod identifier; pub mod iteration; pub mod new; pub mod object; pub mod operator; pub mod return_smt;...
//! Distributed lock backed by Dynamodb. //! Adapted from https://github.com/awslabs/amazon-dynamodb-lock-client. use std::collections::HashMap; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; use crate::storage::s3::{LockClient, LockItem, StorageError}; use maplit::hashmap; use rusoto_core::RusotoError; ...
// Copyright 2020 The Exonum Team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
#![allow(dead_code)] use crate::{ legacy::{LegacyNode, LegacySettings}, scenario::ProgressBarMode, style, Context, }; use chain_impl_mockchain::{ block::Block, fragment::{Fragment, FragmentId}, header::HeaderId, testing::TestGen, }; use jormungandr_lib::{ crypto::hash::Hash, interfa...
mod fixedpoint; pub mod math; use math::{ convert_scale_to_mult_shift, exp_on_negative_values, get_reciprocal, rescale, rounding_divide_by_pot, saturating_rounding_doubling_high_mul, saturating_rounding_multiply_by_pot, }; use num_traits::Float; use std::fmt::Debug; use crate::internal::*; use ndarray::pr...
//! Print (or serialize) IR to human and machine readable text. //! //! This module implements a document based pretty-printer. A couple of 3rd party pretty printing //! crates were assessed but didn't seem to work as well as this simple version, which is quite //! effective. use std::collections::{BTreeMap, HashMap}...