max_stars_repo_path stringlengths 4 207 | max_stars_repo_name stringlengths 5 110 | max_stars_count int64 0 368k | id stringlengths 1 7 | content stringlengths 6 1.05M |
|---|---|---|---|---|
src/interactive/widgets/main.rs | tranzystorek-io/dua-cli | 1,333 | 0 | <reponame>tranzystorek-io/dua-cli
use crate::interactive::{
widgets::{
Entries, EntriesProps, Footer, FooterProps, Header, HelpPane, HelpPaneProps, MarkPane,
MarkPaneProps, COLOR_MARKED,
},
AppState, DisplayOptions, FocussedPane,
};
use dua::traverse::Traversal;
use std::borrow::Borrow;
use ... |
crates/rand/src/distributions/range.rs | CryZe/libtww | 15 | 1 | // Copyright 2013 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 ... |
somm_proto/src/prost/allocation.v1.rs | faddat/sommelier | 1 | 2 | /// AllocationPrecommit defines an array of hashed data to be used for the precommit phase
/// of allocation
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllocationPrecommit {
/// bytes hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];
#[prost(bytes = "vec",... |
crossbeam-channel/src/err.rs | javawolfpack/crossbeam | 0 | 3 | use std::error;
use std::fmt;
/// An error returned from the [`send`] method.
///
/// The message could not be sent because the channel is disconnected.
///
/// The error contains the message so it can be recovered.
///
/// [`send`]: super::Sender::send
#[derive(PartialEq, Eq, Clone, Copy)]
pub struct SendError<T>(pub... |
tests/common/test_gui.rs | ArekPiekarz/rusty-tax-break | 0 | 4 | <reponame>ArekPiekarz/rusty-tax-break
use crate::common::event_processing::processEvents;
use gtk::glib;
use gtk::prelude::Cast as _;
use gtk::prelude::GtkWindowExt as _;
pub struct TestGui
{
window: gtk::ApplicationWindow
}
impl TestGui
{
pub fn new(window: gtk::ApplicationWindow) -> Self
{
Sel... |
mqttbytes/src/v5/unsuback.rs | IniterWorker/rumqtt | 342 | 5 | use super::*;
use bytes::{Buf, BufMut, Bytes, BytesMut};
//// Return code in connack
#[derive(Debug, Clone, Copy, PartialEq)]
#[repr(u8)]
pub enum UnsubAckReason {
Success = 0x00,
NoSubscriptionExisted = 0x11,
UnspecifiedError = 0x80,
ImplementationSpecificError = 0x83,
NotAuthorized = 0x87,
To... |
src/tools/compiletest/src/header.rs | rep-nop/rust | 1 | 6 | use std::collections::HashSet;
use std::env;
use std::fs::File;
use std::io::prelude::*;
use std::io::BufReader;
use std::path::{Path, PathBuf};
use tracing::*;
use crate::common::{CompareMode, Config, Debugger, FailMode, Mode, PassMode};
use crate::util;
use crate::{extract_cdb_version, extract_gdb_version};
#[cfg(... |
crates/rustc_codegen_spirv/src/codegen_cx/mod.rs | spacegaier/rust-gpu | 0 | 7 | mod constant;
mod declare;
mod entry;
mod type_;
use crate::builder::{ExtInst, InstructionTable};
use crate::builder_spirv::{BuilderCursor, BuilderSpirv, SpirvValue, SpirvValueKind};
use crate::decorations::{
CustomDecoration, SerializedSpan, UnrollLoopsDecoration, ZombieDecoration,
};
use crate::spirv_type::{Spir... |
lang/src/accounts/boxed.rs | kklas/anchor | 2 | 8 | //! Box<T> type to save stack space.
//!
//! Sometimes accounts are too large for the stack,
//! leading to stack violations.
//!
//! Boxing the account can help.
//!
//! # Example
//! ```ignore
//! #[derive(Accounts)]
//! pub struct Example {
//! pub my_acc: Box<Account<'info, MyData>>
//! }
//! ```
use crate::{A... |
gtk/src/auto/pad_controller.rs | abdulrehman-git/gtk-rs | 0 | 9 | // This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use gdk;
use gio;
use glib::object::Cast;
use glib::object::IsA;
use glib::object::ObjectType as ObjectType_;
use glib::translate::*;
use glib::StaticType;
use glib::ToValue;
use gli... |
clap_derive/tests/non_literal_attributes.rs | adamrk/clap | 1 | 10 | // Copyright 2018 <NAME> (@TeXitoi) <<EMAIL>>,
// <NAME> (@kbknapp) <<EMAIL>>, and
// <NAME> (@hoverbear) <<EMAIL>>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
//... |
artichoke-backend/src/convert/hash.rs | sandstrom/artichoke | 0 | 11 | <gh_stars>0
use std::collections::HashMap;
use std::convert::TryFrom;
use crate::convert::{BoxUnboxVmValue, UnboxRubyError};
use crate::core::{ConvertMut, TryConvertMut, Value as _};
use crate::error::Error;
use crate::extn::core::array::Array;
use crate::sys;
use crate::types::{Ruby, Rust};
use crate::value::Value;
u... |
libafl/src/bolts/shmem.rs | tokatoka/LibAFL | 0 | 12 | //! A generic sharememory region to be used by any functions (queues or feedbacks
// too.)
#[cfg(all(unix, feature = "std"))]
use crate::bolts::os::pipes::Pipe;
use crate::Error;
use alloc::{rc::Rc, string::ToString};
use core::{
cell::RefCell,
fmt::{self, Debug, Display},
mem::ManuallyDrop,
};
use serde::... |
ckb-bin/src/subcommand/miner.rs | alexwanng/ckb-blockchain | 0 | 13 | use ckb_app_config::{ExitCode, MinerArgs, MinerConfig};
use ckb_miner::{Client, Miner};
use crossbeam_channel::unbounded;
use std::thread;
pub fn miner(args: MinerArgs) -> Result<(), ExitCode> {
let (new_work_tx, new_work_rx) = unbounded();
let MinerConfig { client, workers } = args.config;
let mut client... |
src/scalar_mul/vartime_double_base.rs | DebugSteven/curve25519-dalek | 1 | 14 | <gh_stars>1-10
// -*- mode: rust; -*-
//
// This file is part of curve25519-dalek.
// Copyright (c) 2016-2018 <NAME>, <NAME>
// See LICENSE for licensing information.
//
// Authors:
// - <NAME> <<EMAIL>>
// - <NAME> <<EMAIL>>
#![allow(non_snake_case)]
use constants;
use traits::Identity;
use scalar::Scalar;
use edward... |
fil-proofs-tooling/src/bin/benchy/prodbench.rs | qy3u/rust-fil-proofs | 3 | 15 | use std::fs::remove_file;
use std::str::FromStr;
use bellperson::{util_cs::bench_cs::BenchCS, Circuit};
use blstrs::Scalar as Fr;
use fil_proofs_tooling::{
measure,
shared::{create_replicas, PROVER_ID, RANDOMNESS, TICKET_BYTES},
Metadata,
};
use filecoin_hashers::sha256::Sha256Hasher;
use filecoin_proofs::... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 132