text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use arena::TypedArena;
use rustc::dep_graph::DepNode;
use rustc_const_eval::fatal_const_eval_err;
use rustc::hir;
use rustc::hir::def_id::DefId;
use rustc::hir::map::DefPathData;
use rustc::ty::{self, Ty, TyCtxt};
use rustc::ty::TypeFoldable;
use rustc::ty::subst::Substs;
use syntax::ast::{self, NodeId};
use inspirv::c... | the_stack |
use anyhow::{Context, Result};
use cust::context::{Context as CuContext, ContextFlags};
use cust::device::Device;
use cust::memory::{CopyDestination, DeviceBox, DeviceBuffer, DevicePointer, DeviceVariable};
use cust::stream::{Stream, StreamFlags};
use cust::{CudaFlags, DeviceCopy};
use optix::{
acceleration::Index... | the_stack |
use core;
use core::hash::Hasher;
use interface::{DivansOpResult, DivansResult, DivansOutputResult, DivansInputResult, StreamDemuxer, StreamID, ErrMsg};
use mux::DevNull;
use ::probability::{CDF16};
use ::slice_util::{AllocatedMemoryPrefix, AllocatedMemoryRange};
use ::alloc_util::UninitializedOnAlloc;
use ::divans_to_... | the_stack |
use crate::edit_view::EditView;
use gdk::{Cursor, CursorType, DisplayManager, WindowExt};
use gettextrs::gettext;
use gio::prelude::*;
use gio::Resource;
use glib::{clone, Bytes};
use gtk::prelude::*;
use gtk::{
Adjustment, Box, Builder, Button, CheckButton, EventBox, GestureDrag, GestureZoom, Grid,
Inhibit, La... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_cas... | the_stack |
use crate::common_utils::{buffer, fidl::connect_in_paths};
use crate::modular::types::{
BasemgrResult, KillBasemgrResult, LaunchModRequest, RestartSessionResult, StartBasemgrRequest,
};
use anyhow::{Context, Error};
use fidl::endpoints::ProtocolMarker;
use fidl::endpoints::ServerEnd;
use fidl_fuchsia_io as fio;
use... | the_stack |
use crate::support::sandbox::{sandbox, DistroMetadata, NodeFixture, Sandbox, Yarn1Fixture};
use hamcrest2::assert_that;
use hamcrest2::prelude::*;
use test_support::matchers::execs;
fn platform_with_node(node: &str) -> String {
format!(
r#"{{
"node": {{
"runtime": "{}",
"npm": null
}},
"yarn": null
}}"... | the_stack |
use crate::codec::http_decode_read::HttpFrameDecodedOrGoaway;
use crate::common::conn::Conn;
use crate::common::conn_write::ConnWriteSideCustom;
use crate::common::init_where::InitWhere;
use crate::common::stream::DroppedData;
use crate::common::stream::HttpStreamCommon;
use crate::common::stream::HttpStreamData;
use c... | the_stack |
use whitebox_raster::*;
use crate::tools::*;
use whitebox_vector::{FieldData, ShapeType, Shapefile};
use std::env;
use std::f64;
use std::io::{Error, ErrorKind};
use std::path;
/// This tool can be used to convert a vector points file into a raster grid. The user must
/// specify the name of the input vector and the o... | the_stack |
use crate::{
accounts::{
ConfigAccount,
CustodyAccount,
CustodyAccountDerivationData,
CustodySigner,
Endpoint,
EndpointDerivationData,
MintSigner,
SplTokenMeta,
SplTokenMetaDerivationData,
WrappedDerivationData,
WrappedMetaDeriv... | the_stack |
use test_util as util;
#[test]
fn pty_multiline() {
util::with_pty(&["repl"], |mut console| {
console.write_line("(\n1 + 2\n)");
console.write_line("{\nfoo: \"foo\"\n}");
console.write_line("`\nfoo\n`");
console.write_line("`\n\\`\n`");
console.write_line("'{'");
console.write_line("'('");
... | the_stack |
use crate::git;
use crate::remotes::{MergeRequest, Remote};
use anyhow::{anyhow, Result};
use git_url_parse::GitUrl;
use log::{debug, error, trace};
use logchop::*;
use serde_derive::{Deserialize, Serialize};
#[derive(Debug)]
pub struct GitLab {
pub id: String,
pub domain: String,
pub name: String,
pub... | the_stack |
use beacon_chain::attestation_verification::Error as AttnError;
use beacon_chain::builder::BeaconChainBuilder;
use beacon_chain::test_utils::{
test_spec, AttestationStrategy, BeaconChainHarness, BlockStrategy, DiskHarnessType,
HARNESS_SLOT_TIME,
};
use beacon_chain::{
historical_blocks::HistoricalBlockError... | the_stack |
use anyhow::Context;
use buffers::ByteString;
use dht::{Dht, DhtStats};
use librqbit_core::id20::Id20;
use librqbit_core::torrent_metainfo::TorrentMetaV1Info;
use log::warn;
use parking_lot::RwLock;
use serde::{Deserialize, Serialize};
use std::net::SocketAddr;
use std::sync::Arc;
use std::time::{Duration, Instant};
us... | the_stack |
use crate::internals::*;
use proc_macro2::Span;
use proc_macro2::TokenStream;
use quote::{quote, quote_spanned, ToTokens};
use syn::spanned::Spanned as _;
use syn::Lit;
use syn::Meta::*;
use syn::NestedMeta::*;
#[derive(Clone, Copy)]
struct Generate<'a> {
tokens: &'a Tokens,
attrs: &'a FieldAttrs,
protocol... | the_stack |
macro_rules! forward_val_val_binop {
(impl $imp:ident for $res:ty, $method:ident) => {
impl $imp<$res> for $res {
type Output = $res;
#[inline]
fn $method(self, other: $res) -> $res {
// forward to val-ref
$imp::$method(self, &other)
... | the_stack |
use futures::future::ok;
use std::rc::Rc;
use super::{BoxedNewPeerFuture, Peer};
use super::{ConstructParams, PeerConstructor, Specifier};
use std::cell::RefCell;
use std::io::{Error as IoError, Read, Write};
use tokio_io::{AsyncRead, AsyncWrite};
use super::{once, simple_err, wouldblock};
use futures::{Async, Fut... | the_stack |
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
mod aarch64;
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
use aarch64::*;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod x86_64;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
use x86_64::*;
use std::cell::RefCell;
use std:... | the_stack |
use std::fmt;
use std::future::Future;
use std::io;
use std::io::{Read, SeekFrom, Write};
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
use actix::prelude::*;
use chrono::DateTime;
use fs2::FileExt;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use serde_json;
use tokio::fs::Fil... | the_stack |
use std::process::Child;
#[macro_use]
pub mod common;
// The following integration test modules currently only check whether the processes they start exit
// successfully.
#[cfg(test)]
fn command(input: &str, output: &str, args: &str) -> Child {
common::SicTestCommandBuilder::new()
.input_from_resources(... | the_stack |
use std::cell::RefCell;
use std::rc::Rc;
use actix::prelude::*;
use actix_web::http::{header, StatusCode};
use actix_web::middleware::cors::{Cors, CorsBuilder};
use actix_web::{error::PayloadError, HttpRequest, HttpResponse, ResponseError};
use failure::Fail;
use futures::prelude::*;
use serde::Deserialize;
use relay... | the_stack |
#![allow(unused)]
macro_rules! impl_unary_ {
// implementation mapping 1:1
(vec | $trait_id:ident, $trait_method:ident, $vec_id:ident,
$fun:ident) => {
impl $trait_id for $vec_id {
#[inline]
fn $trait_method(self) -> Self {
unsafe {
use c... | the_stack |
use std::{
borrow::Cow,
convert::{TryFrom, TryInto},
};
use serde::{ser::SerializeMap, Deserialize, Serialize};
use crate::{
raw::{error::ErrorKind, serde::OwnedOrBorrowedRawDocument, RAW_DOCUMENT_NEWTYPE},
DateTime,
Timestamp,
};
use super::{
error::{ValueAccessError, ValueAccessErrorKind, V... | the_stack |
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(unused_parens)]
#![allow(non_upper_case_globals)]
#![allow(unused_results)]
#![allow(missing_docs)]
#![cfg_attr(all(test, feature = "unstable"), feature(test))]
#[cfg(all(test, feature = "unstable"))]
extern crate test;
extern crate ff_bl as ff;
extern... | the_stack |
//! Tests for the module.
use super::*;
use crate::mock::*;
use frame_support::{
assert_noop, assert_ok,
dispatch::DispatchError,
traits::{Currency, ReservableCurrency, OnInitialize, OnFinalize},
};
use sp_runtime::{
assert_eq_error_rate,
traits::BadOrigin,
};
use sp_staking::offence::OffenceDetails... | the_stack |
use crate::clock::GenericClockController;
#[rustfmt::skip]
#[allow(deprecated)]
use crate::gpio::v1;
use crate::gpio::v2::*;
use crate::hal::adc::{Channel, OneShot};
use crate::pac::gclk::genctrl::SRC_A::DFLL;
use crate::pac::gclk::pchctrl::GEN_A;
use crate::pac::{adc0, ADC0, ADC1, MCLK};
use crate::calibration;
/// ... | the_stack |
//! Integration tests for the process of creating and committing a circuit, then abandoning the
//! circuit between multiple nodes.
use std::time::Duration;
use splinter::admin::messages::AuthorizationType;
use splinterd::node::RestApiVariant;
use crate::admin::circuit_commit::{commit_2_party_circuit, commit_3_party... | the_stack |
use std::{
collections::{HashMap, HashSet},
pin::Pin,
task::{Context, Poll},
time::Duration,
};
use futures::{
future::TryFutureExt,
ready,
stream::{FuturesUnordered, Stream},
};
use pin_project::{pin_project, pinned_drop};
use thiserror::Error;
use tokio::{sync::oneshot, task::JoinHandle};... | the_stack |
mod api;
use api::*;
use num_traits::*;
use gam::modal::*;
use keyboard::{RowCol, KeyRawStates};
#[xous::xous_main]
fn xmain() -> ! {
log_server::init_wait().unwrap();
log::set_max_level(log::LevelFilter::Info);
log::info!("my PID is {}", xous::process::id());
let xns = xous_names::XousNames::new().un... | the_stack |
use std::collections::HashSet;
use rand::random;
use piston_window::*;
use opengl_graphics::GlGraphics;
use number_renderer::NumberRenderer;
use settings::Settings;
use tile::{ Tile, TileState };
fn rgb2rgba(c: [f32; 3]) -> [f32; 4] { [c[0], c[1], c[2], 1.0] }
pub struct Board<'a> {
tiles: Vec<Tile<'a>>,
scor... | the_stack |
use crate::{conversions as conv, FastHashMap, PrivateCapabilities, MAX_COLOR_ATTACHMENTS};
use hal::{
command::ClearColor,
format::{Aspects, ChannelType},
image::{Filter, NumSamples},
pso,
};
use metal;
use parking_lot::{Mutex, RawRwLock};
use storage_map::{StorageMap, StorageMapGuard};
use std::mem;... | the_stack |
pub extern crate libc;
#[doc(hidden)]
pub extern crate libretro_sys;
use std::cmp::max;
use std::ffi::{CStr, CString};
use std::mem;
use std::ptr;
use std::slice;
pub use libretro_sys::{PixelFormat, Region};
pub struct CoreInfo {
library_name: CString,
library_version: CString,
supported_romfile_extensio... | the_stack |
use pyo3::exceptions::PyRuntimeError;
use pyo3::types::PyBytes;
use pyo3::{Py, PyResult, Python};
use std::mem;
use std::str;
use bytes::BytesMut;
use http::header::{CONTENT_LENGTH, TRANSFER_ENCODING};
use http::uri::Uri;
use httparse::{parse_chunk_size, Header, Request, Status};
use crate::psgi;
use crate::protoco... | the_stack |
dead_code,
missing_docs,
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features,
unused_import_braces,
unused_qualifications
)]
//! general hex lib
extern crate ansi_term;
extern crate clap;
use atty::Stream... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_cas... | the_stack |
use crate::{
core::{
algebra::{Isometry3, Matrix4, Point3, Translation, Vector3},
math::Rect,
pool::Handle,
scope_profile,
sstorage::ImmutableString,
},
renderer::{
flat_shader::FlatShader,
framework::{
error::FrameworkError,
fr... | the_stack |
use qt_widgets::QLabel;
use qt_widgets::QLayout;
use qt_widgets::QMainWindow;
use qt_widgets::{QMessageBox, q_message_box};
use qt_widgets::QTableView;
use qt_widgets::QWidget;
use qt_gui::QColor;
#[cfg(feature = "support_modern_dds")]
use qt_gui::QImage;
use qt_gui::QPixmap;
use qt_gui::QStandardItemModel;
#[cfg(an... | the_stack |
use crate::core::math::ArgminMul;
use ndarray::{Array1, Array2};
use num_complex::Complex;
macro_rules! make_mul {
($t:ty) => {
impl ArgminMul<$t, Array1<$t>> for Array1<$t> {
#[inline]
fn mul(&self, other: &$t) -> Array1<$t> {
self * *other
}
}
... | the_stack |
use super::Preprocessor;
use crate::errors::Result;
#[derive(Clone)]
pub struct Lines {
separator: u8,
max_length: usize, //set to 0 if no limit for length of the data fragments
buffer: Vec<u8>,
is_buffered: bool, //indicates if buffering is needed.
}
impl Default for Lines {
fn default() -> Self ... | the_stack |
use std::collections::HashMap;
use std::result;
use arret_syntax::span::Span;
use crate::hir::error::{Error, ErrorKind, Result};
use crate::hir::macros::starts_with_zero_or_more;
use crate::hir::ns::{Ident, NsDatum};
use crate::hir::scope::{Binding, Scope};
/// Indicates the meaning of a given ident in the template
... | the_stack |
use std::mem;
use std::ptr;
use std::slice;
use std::ops::Add;
use std::fmt::{self, Display, Formatter, Debug};
use std::ops::*;
use num_traits::{Zero, One, real::Real, FloatConst, NumCast, AsPrimitive};
use approx::{AbsDiffEq, RelativeEq, UlpsEq};
use crate::ops::MulAdd;
use crate::vec;
use crate::geom::{Rect, Frustum... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_cas... | the_stack |
use crate::handlers::{ProcessKeys, HandlerResult};
use crate::key_codes::{AcceptsKeycode, KeyCode};
use crate::key_stream::{iter_unhandled_mut, Event, EventStatus};
use crate::Modifier::*;
use crate::USBKeyOut;
use crate::handlers::oneshot::ONESHOT_TRIGGERS;
use no_std_compat::prelude::v1::*;
pub enum LayerAction<'a> ... | the_stack |
mod test_utils;
use proptest::prelude::*;
use rust_proto_new::graplinc::common::v1beta1::{
Duration,
SystemTime,
};
use test_utils::{
serde::{
check_encode_decode_invariant,
expect_serde_error,
},
strategies,
};
//
// ---------------- protobuf tests ---------------------------------... | the_stack |
use crate::{
errors::{Error, Result},
util::load_trickle,
};
use clap::{self, ArgMatches};
use halfbrown::HashMap;
use http_types::{headers, StatusCode};
use tremor_script::prelude::*;
use crate::util::{accept, content_type, load, save_config, ser, TremorApp};
pub(crate) async fn run_cmd(mut app: TremorApp, c... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![rustfmt::skip]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allo... | the_stack |
use std::{cmp::Ordering, mem::size_of};
use crate::client::render::Palette;
use failure::Error;
const DEFAULT_ATLAS_DIM: u32 = 1024;
struct Rect {
x: u32,
y: u32,
width: u32,
height: u32,
}
fn area_order(t1: &TextureData, t2: &TextureData) -> Ordering {
(t1.width * t1.height).cmp(&(t2.width * t... | the_stack |
use crate::{
carets::*,
db::*,
graphql::sync_graphql_server,
log::log_sync_init,
state::*,
};
use crossbeam_channel::{
unbounded,
Receiver as CCReceiver,
Sender as CCSender,
};
use edit_common::commands::*;
use edit_common::simple_ws;
use edit_common::simple_ws::*;
use failure::Error;
u... | the_stack |
use crate::cx::*;
#[derive(Debug, Copy, Clone)]
pub enum Wrapping {
Char,
Word,
Line,
None,
Ellipsis(f32)
}
#[derive(Debug)]
#[repr(C, packed)]
pub struct DrawText {
pub shader: Shader,
pub area: Area,
pub many: Option<ManyInstances>,
pub many_old_area: Area,
pub slots: usize,
... | the_stack |
use crate::prelude::*;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use std::time::Duration;
use crate::bookmark;
use crate::config::Config;
use crate::elastic;
use crate::elastic::template_installer;
use crate::eve;
use crate::eve::filters::{AddRuleFilter, EveFilter};
use crate::eve::Processor;
us... | the_stack |
use crate::Value;
use indexmap::IndexMap;
use serde::{Deserialize, Deserializer, Serialize};
use std::cmp::Ordering;
use std::collections::hash_map::DefaultHasher;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::iter::FromIterator;
use std::ops::{Index, IndexMut};
/// A YAML mapping in which the keys and values ... | the_stack |
use crate::handlers::RewriteLayer;
/// premade handlers for various occacions
use crate::handlers::{Action, OnOff, OneShot, PressReleaseMacro, SpaceCadet, HandlerResult, ProcessKeys};
use crate::key_stream::{iter_unhandled_mut, Event, EventStatus};
use crate::Modifier::*;
use crate::{AcceptsKeycode, HandlerID, KeyCode,... | the_stack |
fn main() {
use std::mem::ManuallyDrop;
use gfx_hal::{
device::Device,
window::{Extent2D, PresentationSurface, Surface},
Instance,
};
use shaderc::ShaderKind;
const APP_NAME: &'static str = "Part 1: Drawing a triangle";
const WINDOW_SIZE: [u32; 2] = [512, 512];
// ... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateSkillGroupOutput {}
impl std::fmt::Debug for UpdateSkillGroupOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug... | the_stack |
#![deny(missing_docs)]
#![allow(clippy::new_without_default)]
#![allow(clippy::comparison_chain)]
use std::io;
use std::io::prelude::*;
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
use std::os::unix::net::UnixStream;
use std::time;
pub use interest::Interest;
/// Source readiness interest.
pub mod interest {
... | the_stack |
use clap::Parser;
use mirai_annotations::unrecoverable;
use regex::Regex;
use std::{
collections::HashMap,
fs,
path::{Path, PathBuf},
process::Command,
};
mod configuration;
mod datalog;
mod ddlog_output;
mod souffle_output;
mod util;
use configuration::{generate_config, NodeTypeConfig};
use datalog::... | the_stack |
use std::fmt;
use base::ast::{self, DisplayEnv, Expr, SpannedExpr, MutVisitor, Typed, TypedIdent};
use base::pos::{self, BytePos, Span, Spanned};
use base::error::Errors;
use base::fnv::FnvMap;
use base::scoped_map::ScopedMap;
use base::symbol::{Symbol, SymbolRef, SymbolModule};
use base::types::{self, Alias, ArcType,... | the_stack |
// TODO(blacknon): キーワード検索機能の追加(v0.1.4)
// - `/`でキーボード入力モードに
// - `f`でフィルターモードの切り替えか?(ハイライトモードとフィルタリングモード)
// - ESCで元に戻す
// - lessみたいに、キーワードの検索が行えるようにする
// - 検索方式として、`ハイライト方式`及び`絞り込み方式`の2つが必要?
// TODO(blacknon): ヘルプ機能の追加(v0.1.4)
// - `h`でヘルプウィンドウの表示をする
// - `h`キーを再度入力することで切り替える
// - `h`... | the_stack |
use bellman::gadgets::test::TestConstraintSystem;
use bellman::groth16::{
create_random_proof, generate_parameters, generate_random_parameters, prepare_verifying_key,
verify_proof, Parameters, Proof, VerifyingKey,
};
use bellman::Circuit;
use bls12_381::{Bls12, Scalar};
use circ::front::datalog::{self, Datalog}... | the_stack |
macro_rules! count_tt {
() => { 0 };
($odd:tt $($a:tt $b:tt)*) => { (count_tt!($($a)*) << 1) | 1 };
($($a:tt $even:tt)*) => { count_tt!($($a)*) << 1 };
}
macro_rules! char_as_cell {
($c: expr) => {
HeapCellValue::build_with(HeapCellValueTag::Char, $c as u64)
};
}
macro_rules! fixnum_as_cel... | the_stack |
use core::slice;
use helper;
/// A SeaHash state.
#[derive(Clone)]
pub struct State {
/// `a`
a: u64,
/// `b`
b: u64,
/// `c`
c: u64,
/// `d`
d: u64,
/// The number of written bytes.
written: u64,
}
impl State {
/// Create a new state vector with some initial values.
p... | the_stack |
use crate::{
data_notification::{
DataClientRequest, DataClientRequest::EpochEndingLedgerInfos,
EpochEndingLedgerInfosRequest, SentDataNotification,
},
error::Error,
streaming_client::{Epoch, GetAllEpochEndingLedgerInfosRequest, StreamRequest},
};
use diem_data_client::AdvertisedData;
us... | the_stack |
use crate::*;
use std::{
fmt,
io::{BufRead, Error as ioError},
iter::FusedIterator,
marker::PhantomData,
};
use super::{types::*, utils::*};
//------------------------------------------------------------------------------
/// Iterator to incrementally load points from a .off file
pub struct OffPoint... | the_stack |
//! Minimal benchmarks and comparison of some IO manipulation.
//!
//! This tries to compare speed of different methods how to implement a networked server. The
//! servers differ, while the client is always the same.
//!
//! The client opens `PARALLEL` connections to the server, then `EXCHANGES` times sends a buffer o... | the_stack |
//! Shaded theme
use std::f32;
use std::ops::Range;
use crate::{dim, ColorsLinear, Config, FlatTheme, Theme};
use crate::{DrawShaded, DrawShadedImpl};
use kas::dir::{Direction, Directional};
use kas::draw::{self, color::Rgba, *};
use kas::geom::*;
use kas::text::{AccelString, Text, TextApi, TextDisplay};
use kas::TkA... | the_stack |
use std::cmp::Ordering;
use std::collections::{BinaryHeap, HashMap, HashSet};
use std::time;
use std::{f32, ptr};
use crate::MOVE_TO_THRESHOLD;
use sulis_core::util::{self, Point};
const MAX_ITERATIONS: i32 = 2_000;
#[derive(Debug, Clone, Copy)]
pub struct Destination {
pub parent_w: f32,
pub parent_h: f32,
... | the_stack |
use std::rc::Rc;
use std::default::Default;
use timely::dataflow::operators::{Enter, Map};
use timely::order::{PartialOrder, TotalOrder};
use timely::dataflow::{Scope, Stream};
use timely::dataflow::operators::generic::Operator;
use timely::dataflow::channels::pact::{ParallelizationContract, Pipeline, Exchange};
use t... | the_stack |
mod jitfunc;
use super::{
tuple::PyTupleTyped, PyAsyncGen, PyCode, PyCoroutine, PyDictRef, PyGenerator, PyStrRef,
PyTupleRef, PyTypeRef,
};
use crate::{
bytecode,
common::lock::PyMutex,
frame::Frame,
function::{FuncArgs, OptionalArg},
protocol::PyMapping,
scope::Scope,
types::{Calla... | the_stack |
use assert_fs::prelude::*;
use git_stack::git::*;
#[test]
fn shared_branches_fixture() {
let temp = assert_fs::TempDir::new().unwrap();
let plan = git_fixture::Dag::load(std::path::Path::new("tests/fixtures/branches.yml")).unwrap();
plan.run(temp.path()).unwrap();
let repo = git2::Repository::discove... | the_stack |
use super::effective_address;
use super::{Core, Result};
pub fn ea_ay_pd_8<T: Core>(core: &mut T) -> Result<(u32, u32)> {
effective_address::predecrement_ay_8(core)
.and_then(|ea| core.read_data_byte(ea).map(|val| (val, ea)))
}
pub fn ea_ax_pd_8<T: Core>(core: &mut T) -> Result<(u32, u32)> {
effective_addr... | the_stack |
use crate::rcc::backup::BackupREC;
use crate::stm32::PWR;
#[cfg(all(
feature = "revision_v",
any(feature = "rm0433", feature = "rm0399")
))]
use crate::stm32::{RCC, SYSCFG};
#[cfg(all(
feature = "rm0433",
any(feature = "smps", feature = "example-smps")
))]
compile_error!("SMPS configuration fields are ... | the_stack |
use crate::parser::{ParseArg, Parser};
use proc_macro2::{token_stream, Delimiter, Ident, Literal, Span, TokenStream, TokenTree};
use proc_macro_error::abort;
use quote::quote;
use std::ffi::OsString;
use std::iter::Peekable;
// Scan string literal to tokenstream, used by most of the macros
//
// - support ${var} or $v... | the_stack |
use std::collections::{BTreeMap, HashSet};
use std::env;
use std::f64;
use std::io::{Error, ErrorKind};
use std::path;
use std::str;
use std::time::Instant;
use std::sync::mpsc;
use std::sync::Arc;
use std::thread;
use num_cpus;
use whitebox_common::utils::get_formatted_elapsed_time;
use whitebox_raster::*;
// use v_ev... | the_stack |
//! Provides a macro, `assert_matches!`, which tests whether a value
//! matches a given pattern, causing a panic if the match fails.
//!
//! See the macro [`assert_matches!`] documentation for more information.
//!
//! Also provides a debug-only counterpart, [`debug_assert_matches!`].
//!
//! See the macro [`debug_ass... | the_stack |
//! Data store for writing and reading circuit state and pending circuit proposals.
//!
//! The [`AdminServiceStore`] trait provides the public interface for storing circuits and
//! proposals. Splinter provides the following implementations of this trait:
//!
//! * [`YamlAdminServiceStore`] - A YAML-backed store that ... | the_stack |
extern crate failure;
extern crate edn;
extern crate mentat_core;
#[macro_use]
extern crate core_traits;
extern crate query_algebrizer_traits;
use std::collections::BTreeSet;
use std::ops::Sub;
use std::rc::Rc;
mod types;
mod validate;
mod clauses;
use core_traits::{
Entid,
TypedValue,
ValueType,
};
us... | the_stack |
use snafu::ResultExt;
use crate::etag::{EntityTag, Etagged};
use crate::models::{
workflows::WorkflowListArtifact,
ArtifactId, RepositoryId, RunId,
};
use crate::{params, FromResponse, Octocrab, Page};
use hyperx::header::{ETag, IfNoneMatch, TypedHeaders};
use reqwest::{header::HeaderMap, Method, StatusCode};
... | the_stack |
use num_bigint::{BigInt, ToBigInt};
use num_traits::{Float, Signed, ToPrimitive, Zero};
use std::f64;
pub fn ufrexp(value: f64) -> (f64, i32) {
if 0.0 == value {
(0.0, 0i32)
} else {
let bits = value.to_bits();
let exponent: i32 = ((bits >> 52) & 0x7ff) as i32 - 1022;
let mantis... | the_stack |
use crate::fmt;
use crate::ops::{Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign};
use crate::ops::{BitXor, BitXorAssign, Div, DivAssign};
use crate::ops::{Mul, MulAssign, Neg, Not, Rem, RemAssign};
use crate::ops::{Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign};
/// Provides intentionally-wrapped arithmetic... | the_stack |
use common::BitSet;
use itertools::Itertools;
use crate::fastfield::AliveBitSet;
use crate::{merge_filtered_segments, Directory, Index, IndexSettings, Segment, SegmentOrdinal};
/// DemuxMapping can be used to reorganize data from multiple segments.
///
/// DemuxMapping is useful in a multitenant settings, in which eac... | the_stack |
use crate::common;
use env_logger;
use aerospike::expressions::*;
use aerospike::ParticleType;
use aerospike::*;
use std::sync::Arc;
const EXPECTED: usize = 100;
fn create_test_set(no_records: usize) -> String {
let client = common::client();
let namespace = common::namespace();
let set_name = common::ra... | the_stack |
use query_engine_tests::*;
#[test_suite(schema(schema), only(MongoDb))]
mod raw_mongo {
use indoc::indoc;
use query_engine_tests::{run_query, Runner};
use serde_json::json;
fn schema() -> String {
let schema = indoc! {
r#"model TestModel {
#id(id, Int, @id)
... | the_stack |
use anchor_lang::prelude::*;
use borsh::{BorshDeserialize, BorshSerialize};
use crate::controller;
use crate::controller::amm::SwapDirection;
use crate::error::{ClearingHouseResult, ErrorCode};
use crate::math::amm::should_round_trade;
use crate::math::casting::{cast, cast_to_i128};
use crate::math::collateral::calcul... | the_stack |
adt_const_params,
box_syntax,
const_fn_floating_point_arithmetic,
const_fn_trait_bound,
const_trait_impl,
exact_size_is_empty,
generic_const_exprs,
read_buf,
trusted_random_access
)]
// In case you're wondering why there's extensive use of "StaticVecs that contain boxed items"
// (something that would ... | the_stack |
use std::cell::UnsafeCell;
use std::mem::MaybeUninit;
use std::ptr;
use std::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
use std::thread;
use cache_padded::CachePadded;
use crate::{PopError, PushError};
// Bits indicating the state of a slot:
// * If a value has been written into the slot, `WRITE` is set.
// *... | the_stack |
use core::cmp;
use core::intrinsics::unlikely;
use core::ptr::{self, NonNull};
#[cfg(not(test))]
use alloc::boxed::Box;
#[cfg(not(test))]
use alloc::vec::Vec;
use intrusive_collections::{LinkedListLink, UnsafeRef};
use liblumen_alloc_macros::*;
use liblumen_core::alloc::mmap;
use liblumen_core::alloc::prelude::*;
us... | the_stack |
use aws_smithy_http::middleware::MapRequest;
use aws_smithy_http::operation::Request;
use aws_types::app_name::AppName;
use aws_types::build_metadata::{OsFamily, BUILD_METADATA};
use aws_types::os_shim_internal::Env;
use http::header::{HeaderName, InvalidHeaderValue, USER_AGENT};
use http::HeaderValue;
use std::borrow:... | the_stack |
// FIXME: this file can be completely removed after the following PRs
// are in a released version of the `x86_64` crate:
// https://github.com/rust-osdev/x86_64/pull/313
// Copyright 2017 Philipp Oppermann. See the README.md
// file at the top-level directory of
// [this distribution](https://github.com/rust-osdev/x8... | the_stack |
use std::io::Write;
use std::io::{self, Read};
use byteorder::{LittleEndian, WriteBytesExt};
use bytes::{Buf, BytesMut};
use flate2::Compression;
#[cfg(not(feature = "libdeflate"))]
use flate2::{Compress, Decompress, FlushCompress};
#[cfg(not(feature = "libdeflate"))]
use crate::check::Check;
use crate::deflate::Bgzf... | the_stack |
// This compressor is based on source code that was contributed to
// OpenEXR by Pixar Animation Studios. The compression method was
// developed by Loren Carpenter.
// The compressor preprocesses the pixel data to reduce entropy, and then calls zlib.
// Compression of HALF and UINT channels is lossless, but compres... | the_stack |
pub use self::Event::*;
use core::Core;
use ffi::*;
use keycodes::{KeyCode, KeyModifier};
use libc::*;
use std::any::Any;
use std::marker::PhantomData;
use std::mem;
use std::ptr;
use std::rc::Rc;
const USER_EVENT_TYPE: u32 = 10556114;
pub struct EventQueue
{
allegro_queue: *mut ALLEGRO_EVENT_QUEUE,
}
impl EventQu... | the_stack |
use crate::{
cil::{
CorExceptionFlag, FatSectionClause, Instruction, Method, Operand::ShortInlineBrTarget, RET,
},
ffi::{
mdMethodDef, mdTokenNil, mdTypeSpecNil, CorCallingConvention, FunctionID, ModuleID, ReJITID,
},
interfaces::{ICorProfilerFunctionControl, ICorProfilerInfo4},
... | the_stack |
use std::mem;
use std::ops::{Index, IndexMut};
/// A node identifier within a particular `Arena`.
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
pub struct NodeId {
index: usize, // FIXME: use NonZero to optimize the size of Option<NodeId>
}
#[derive(Clone)]
pub struct Node<T> {
// Keep these private (with re... | the_stack |
// 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) any later version.
// Substrate is distributed in the hope that it will be useful,
// but... | the_stack |
use crate::{
actors::{ActorPath, DynActorRef},
messaging::NetMessage,
utils::IterExtras,
KompactLogger,
};
#[allow(unused_imports)]
use slog::{crit, debug, error, info, trace, warn};
use std::{
fmt,
hash::{BuildHasher, BuildHasherDefault, Hash, Hasher},
ops::Deref,
sync::atomic::{AtomicU... | the_stack |
//! Transaction Queue
use super::{
client, listener, local_transactions::LocalTransactionsList, ready, replace, scoring, verifier,
PendingOrdering, PendingSettings, PrioritizationStrategy, SeqNumber, TxStatus,
};
use crate::pool::ready::Expiration;
use crate::{pool, pool::PoolTransaction};
use crypto::hash::Ha... | the_stack |
use crate::rule_prelude::*;
use ast::*;
use SyntaxKind::*;
declare_lint! {
/**
Disallow unnecessary boolean casts.
In contexts where expression will be coerced to a `Boolean` (e.g. `if`),
casting to a boolean (using `!!` or `Boolean(expr)`) is unnecessary.
## Invalid Code Examples
```js
... | the_stack |
use std::collections::{HashMap, HashSet};
#[cfg(feature = "debug_table_print")]
use prettytable::Table;
#[cfg(feature = "debug_table_print")]
use super::TARGET;
#[cfg(feature = "debug_table_print")]
use log::trace;
use super::pattern::PatternProvider;
use super::LeafId;
#[derive(Debug, Derivative)]
#[derivative(Clo... | the_stack |
use super::*;
use crate::crypto::threshold_sig::ni_dkg::{NiDkgTag, NiDkgTargetSubnet};
use crate::{Height, PrincipalId, SubnetId};
use ic_crypto_internal_types::sign::threshold_sig::ni_dkg::CspNiDkgTranscript;
pub const NODE_1: u64 = 1;
pub const NODE_2: u64 = 2;
pub const NODE_3: u64 = 3;
pub const NODE_4: u64 = 4;
... | the_stack |
use std::io::{self, Write};
use std::usize;
use merge::ValueMerger;
mod delta;
pub mod merge;
pub mod value;
pub(crate) mod sstable_index;
pub(crate) use self::sstable_index::{SSTableIndex, SSTableIndexBuilder};
pub(crate) mod vint;
mod block_reader;
pub use self::block_reader::BlockReader;
pub use self::delta::De... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.