commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
71c74c72b4bb5518624cdb1e78eee7491583cb93 | Manish Goregaokar | 2018-07-19T07:19:51 | Use local_inner_macros to allow compilation with new-style macro imports
See https://github.com/rust-lang-nursery/lazy-static.rs/commit/e3b8efe2196125e2b94c41a690c551163a2ddc85
(this compiles on stable) | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index f4240e3..c26883d 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "matches"
-version = "0.1.6"
+version = "0.1.7"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/Sim... | 2 | 5 | 5 |
88a017b79ea146d6fde389c96982fc7518ba98bf | Simon Sapin | 2017-07-06T06:10:53 | Upgrade to rustc 1.20.0-nightly (3610a70ce 2017-07-05) | diff --git a/zip_longest/lib.rs b/zip_longest/lib.rs
index 107a924..bedc120 100644
--- a/zip_longest/lib.rs
+++ b/zip_longest/lib.rs
@@ -1,8 +1,5 @@
-#![cfg_attr(test, feature(step_by))]
-
use std::cmp;
-
pub trait ZipLongestIteratorExt: Iterator + Sized {
/// Creates an iterator which iterates over both this ... | 1 | 1 | 4 |
fb049f3d67c1a2c17ddd8a3d4c4c2782537a183b | Simon Sapin | 2017-06-06T12:48:58 | Hide _matches_tt_as_expr_hack in docs. | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index 66e1304..f4240e3 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "matches"
-version = "0.1.5"
+version = "0.1.6"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/Sim... | 2 | 2 | 1 |
e740540f229d300151b0d1174f5316f39bd3d849 | Simon Sapin | 2017-06-06T12:12:35 | matches v0.1.5 | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index bbd7747..66e1304 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "matches"
-version = "0.1.4"
+version = "0.1.5"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/Sim... | 1 | 1 | 1 |
0b3312a8faaac344e7fd49cb6c23ac465a5bb7c2 | Simon Sapin | 2017-06-06T12:12:04 | Revert "matches: Remove _matches_tt_as_expr_hack, it is redundant in Rust 1.12+"
This reverts commit b696bae77c38f480b920441c4bea8b4fe23e4b66. | diff --git a/matches/lib.rs b/matches/lib.rs
index d807fc5..6482682 100644
--- a/matches/lib.rs
+++ b/matches/lib.rs
@@ -30,13 +30,21 @@
#[macro_export]
macro_rules! matches {
($expression:expr, $($pattern:tt)+) => {
- match $expression {
- $($pattern)+ => true,
- _ => false
+ ... | 1 | 16 | 6 |
98df039c0fc23e69ff18d836f155321155ca78ad | bluss | 2017-04-04T01:11:19 | matches: Use doctests | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index 7a34b62..bbd7747 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -10,4 +10,3 @@ documentation = "https://docs.rs/matches/"
[lib]
name = "matches"
path = "lib.rs"
-doctest = false | 1 | 0 | 1 |
c0baac128a408229d5d3d092654c2e51014fefcf | bluss | 2017-04-04T01:10:50 | matches: Link to docs.rs for documentation | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index f3977a5..7a34b62 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -5,6 +5,7 @@ authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/SimonSapin/rust-std-candidates"
description = "A macro to evaluate, as... | 1 | 1 | 0 |
b7631a11cf3caba6f9719dbdc419253dc4453de5 | bluss | 2017-04-04T01:09:59 | matches: Add docs and examples | diff --git a/matches/lib.rs b/matches/lib.rs
index 96d1fe9..d807fc5 100644
--- a/matches/lib.rs
+++ b/matches/lib.rs
@@ -1,3 +1,32 @@
+/// Check if an expression matches a refutable pattern.
+///
+/// Syntax: `matches!(` *expression* `,` *pattern* `)`
+///
+/// Return a boolean, true if the expression matches the patte... | 1 | 67 | 0 |
b696bae77c38f480b920441c4bea8b4fe23e4b66 | bluss | 2017-04-04T00:57:47 | matches: Remove _matches_tt_as_expr_hack, it is redundant in Rust 1.12+ | diff --git a/matches/lib.rs b/matches/lib.rs
index eeba978..96d1fe9 100644
--- a/matches/lib.rs
+++ b/matches/lib.rs
@@ -1,29 +1,19 @@
#[macro_export]
macro_rules! matches {
($expression:expr, $($pattern:tt)+) => {
- _matches_tt_as_expr_hack! {
- match $expression {
- $($pattern)... | 1 | 6 | 16 |
c17e437f6a41a6f624fd62396e550a51595b1669 | Simon Sapin | 2016-10-09T18:13:33 | matches 0.1.3 | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index 344f8d4..042e1cc 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "matches"
-version = "0.1.2"
+version = "0.1.3"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/Sim... | 1 | 1 | 1 |
889bb070c1c10ad6c26f1a177fea901635056ac1 | CasualX | 2016-10-09T14:37:29 | Expanded with explicit assert support to print the failing expression.
Renamed `_tt_as_expr_hack` to be more crate specific to avoid potential conflicts: I tried scoping it with `$crate::` but that doesn't appear to work for macros...
Added tests for the new macros. | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index 124ee8a..344f8d4 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,5 +1,4 @@
[package]
-
name = "matches"
version = "0.1.2"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
@@ -7,7 +6,6 @@ license = "MIT"
repository = "https://github.com/Simon... | 2 | 39 | 7 |
e10bfebe1c355a5c278e906f6c30de871ceda2d6 | Simon Sapin | 2016-08-02T16:44:12 | Update tests for https://github.com/rust-lang/rust/pull/34485 | diff --git a/string-wrapper/lib.rs b/string-wrapper/lib.rs
index 24c0df9..0703566 100644
--- a/string-wrapper/lib.rs
+++ b/string-wrapper/lib.rs
@@ -321,7 +321,7 @@ fn it_works() {
let buffer: [u8; 10] = s.clone().into_buffer();
assert_eq!(&buffer, b"a\xC3\xA9~~~_ell");
assert_eq!(format!("{}", s), "aé~~... | 1 | 1 | 1 |
81c6498e1abf70d275b3e74d50d1d82c45fa60e5 | Simon Nilsson | 2015-12-13T16:21:51 | Bump mod_path version | diff --git a/mod_path/Cargo.toml b/mod_path/Cargo.toml
index 89b24b9..4f767af 100644
--- a/mod_path/Cargo.toml
+++ b/mod_path/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "mod_path"
-version = "0.1.5"
+version = "0.1.6"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.... | 1 | 1 | 1 |
2a7906e8c1ff2d2fd5fee31dbf778c340e50c832 | Simon Nilsson | 2015-12-13T16:16:54 | Update mod_path for Rust nightly | diff --git a/mod_path/lib.rs b/mod_path/lib.rs
index ce682d5..672b348 100644
--- a/mod_path/lib.rs
+++ b/mod_path/lib.rs
@@ -2,13 +2,14 @@
extern crate syntax;
extern crate rustc;
+extern crate rustc_plugin;
use syntax::codemap::Span;
use syntax::parse::token;
use syntax::ast::{TokenTree, Ident};
use syntax::... | 1 | 2 | 1 |
90b31dfafd7c6b6d15905db7a5db7836e6a6105f | Simon Sapin | 2015-11-05T20:51:12 | Update tests | diff --git a/string-wrapper/Cargo.toml b/string-wrapper/Cargo.toml
index 890dfdf..d70c8a8 100644
--- a/string-wrapper/Cargo.toml
+++ b/string-wrapper/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "string-wrapper"
-version = "0.1.4"
+version = "0.1.5"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT / A... | 2 | 1 | 7 |
e17c3aadc3c846e589b76f4a068862d5543e12ea | Simon Sapin | 2015-10-31T11:31:05 | More string-wrapper docs. | diff --git a/string-wrapper/Cargo.toml b/string-wrapper/Cargo.toml
index 04392f4..890dfdf 100644
--- a/string-wrapper/Cargo.toml
+++ b/string-wrapper/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "string-wrapper"
-version = "0.1.3"
+version = "0.1.4"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT / A... | 2 | 31 | 10 |
38d3ecb9fd049f05e75d75eaac8032b1e6dd7a9c | Simon Sapin | 2015-10-30T06:56:36 | Relicense string-wrapper | diff --git a/string-wrapper/Cargo.toml b/string-wrapper/Cargo.toml
index 6add0b0..04392f4 100644
--- a/string-wrapper/Cargo.toml
+++ b/string-wrapper/Cargo.toml
@@ -1,8 +1,8 @@
[package]
name = "string-wrapper"
-version = "0.1.2"
+version = "0.1.3"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
-license = "MIT"
+l... | 1 | 2 | 2 |
8113ebdee2bc1e2f8282e2deb84d56e4ef4e93a4 | Simon Sapin | 2015-10-29T15:57:27 | string-wrapper: add Copy, Default, and is_empty | diff --git a/string-wrapper/Cargo.toml b/string-wrapper/Cargo.toml
index 9b133f4..6add0b0 100644
--- a/string-wrapper/Cargo.toml
+++ b/string-wrapper/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "string-wrapper"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
r... | 2 | 6 | 2 |
fa4ff4da0e513088e5c606515c63c7e78df75644 | Simon Sapin | 2015-10-27T13:35:16 | Cover a safety hole in string-wrapper. | diff --git a/string-wrapper/Cargo.toml b/string-wrapper/Cargo.toml
index 53d107a..9b133f4 100644
--- a/string-wrapper/Cargo.toml
+++ b/string-wrapper/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "string-wrapper"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
r... | 2 | 80 | 8 |
83f5d1a39b4800fe1383b4c3b8b05db71b01463b | Simon Sapin | 2015-05-22T09:39:11 | Enable mod_path test again.
https://github.com/rust-lang/cargo/issues/1239 is fixed. | diff --git a/mod_path/build.rs b/mod_path/build.rs
index ad1d40e..2223308 100644
--- a/mod_path/build.rs
+++ b/mod_path/build.rs
@@ -7,6 +7,6 @@ fn main() {
let dst = PathBuf::from(&env::var("OUT_DIR").unwrap());
let mut f = File::create(&dst.join("hello.rs")).unwrap();
f.write_all(b"
- pub const ... | 2 | 4 | 3 |
17ef3b614ed9823dfa601fd582b68a734006ecd0 | Simon Sapin | 2015-04-03T08:44:06 | Upgrade to rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02) | diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index 4ecf292..f25a215 100644
--- a/text_writer/Cargo.toml
+++ b/text_writer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "text_writer"
-version = "0.1.9"
+version = "0.1.10"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "h... | 2 | 8 | 5 |
e616ef2b28ff8e2601d7178f7b3436d7c67b6633 | Simon Sapin | 2015-04-02T15:19:08 | Upgrade to rustc 1.0.0-nightly (2e3b0c051 2015-04-01) (built 2015-04-02) | diff --git a/mod_path/build.rs b/mod_path/build.rs
index c24949d..ad1d40e 100644
--- a/mod_path/build.rs
+++ b/mod_path/build.rs
@@ -1,5 +1,3 @@
-#![feature(convert)]
-
use std::env;
use std::fs::File;
use std::io::Write;
diff --git a/triable/Cargo.toml b/triable/Cargo.toml
index 863778f..8ae4072 100644
--- a/triabl... | 5 | 7 | 9 |
b0b364e101b9014008b1e8719f8e2efc9245e991 | Simon Sapin | 2015-03-25T18:02:17 | Upgrade to rustc 1.0.0-nightly (123a754cb 2015-03-24) (built 2015-03-25) | diff --git a/mod_path/Cargo.toml b/mod_path/Cargo.toml
index 4465cec..89b24b9 100644
--- a/mod_path/Cargo.toml
+++ b/mod_path/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "mod_path"
-version = "0.1.4"
+version = "0.1.5"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.... | 3 | 5 | 5 |
62ef6d68adf848cc962d0853a884ad579bdfb17b | Simon Sapin | 2015-03-25T17:04:56 | Servo is now on a Rust version that has $crate | diff --git a/triable/Cargo.toml b/triable/Cargo.toml
index 4dadec7..863778f 100644
--- a/triable/Cargo.toml
+++ b/triable/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "triable"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/S... | 2 | 5 | 10 |
490fca00f4d5da97f946dbf4d9b0ebe730ab9f03 | Simon Sapin | 2015-03-25T16:39:16 | Triable: add bool, with conversions to and from Option<()> and Result<(), ()> | diff --git a/triable/lib.rs b/triable/lib.rs
index f2dd0a2..9d634ed 100644
--- a/triable/lib.rs
+++ b/triable/lib.rs
@@ -69,6 +69,58 @@ impl<T1, T2> Triable<T1, Option<T2>> for Result<T1, ()> {
}
+impl Triable<(), bool> for bool {
+ fn try(self) -> TriableResult<(), bool> {
+ if self {
+ Triab... | 1 | 122 | 0 |
525cdb1372cca30786f020dbc0c44286883bde86 | Simon Sapin | 2015-03-25T15:51:53 | Triable: add conversions between Option<T> and Result<T, ()>. | diff --git a/triable/lib.rs b/triable/lib.rs
index 41c6226..f2dd0a2 100644
--- a/triable/lib.rs
+++ b/triable/lib.rs
@@ -1,3 +1,5 @@
+use std::error::FromError;
+
#[macro_export]
macro_rules! try {
($expression: expr) => {
@@ -27,11 +29,11 @@ pub trait Triable<Expr, Return> {
impl<T1, T2, Err1, Err2> Triabl... | 1 | 50 | 2 |
a60ee937b368087fc04aabb265c7ea70ecb3190a | Simon Sapin | 2015-03-25T15:25:52 | Split up triable tests. | diff --git a/triable/lib.rs b/triable/lib.rs
index 1567d77..41c6226 100644
--- a/triable/lib.rs
+++ b/triable/lib.rs
@@ -48,24 +48,28 @@ impl<T1, T2> Triable<T1, Option<T2>> for Option<T1> {
#[test]
-fn it_works() {
- fn result_ok() -> Result<i32, ()> {
+fn result() {
+ fn ok() -> Result<i32, ()> {
... | 1 | 13 | 9 |
f27cffdbd2755d7a6e9deaf969fdb7e72a1a1f7e | Simon Sapin | 2015-03-09T06:04:49 | Upgrade to rustc 1.0.0-nightly (2fc8b1e7c 2015-03-07) (built 2015-03-08) | diff --git a/mod_path/Cargo.toml b/mod_path/Cargo.toml
index 8f46fb3..4465cec 100644
--- a/mod_path/Cargo.toml
+++ b/mod_path/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "mod_path"
-version = "0.1.3"
+version = "0.1.4"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.... | 3 | 8 | 6 |
30023cf8f16d143dcf7f56c451939fe25460c09a | Simon Sapin | 2015-03-02T10:28:11 | Upgrade to rustc 1.0.0-nightly (890293655 2015-02-28) (built 2015-03-01) | diff --git a/mod_path/Cargo.toml b/mod_path/Cargo.toml
index 3eb59d3..8f46fb3 100644
--- a/mod_path/Cargo.toml
+++ b/mod_path/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "mod_path"
-version = "0.1.2"
+version = "0.1.3"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.... | 3 | 6 | 5 |
836264aaca5a701d130b86579395693c1430c1d2 | Simon Sapin | 2015-02-20T17:30:38 | Upgrade to rustc 1.0.0-nightly (522d09dfe 2015-02-19) (built 2015-02-20) | diff --git a/mod_path/build.rs b/mod_path/build.rs
index cc0d113..cb404c3 100644
--- a/mod_path/build.rs
+++ b/mod_path/build.rs
@@ -1,4 +1,4 @@
-#![feature(env, path, io)]
+#![feature(env, old_path, old_io)]
use std::env;
use std::old_io::File;
diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index 9de... | 4 | 5 | 5 |
4e877ffbd1b0caa53a85e6d244fc5d2dc245bb94 | Simon Sapin | 2015-02-13T04:06:52 | Upgrade to rustc 1.0.0-nightly (3ef8ff1f8 2015-02-12 00:38:24 +0000) | diff --git a/mod_path/Cargo.toml b/mod_path/Cargo.toml
index cbfb04c..3eb59d3 100644
--- a/mod_path/Cargo.toml
+++ b/mod_path/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "mod_path"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.... | 3 | 4 | 4 |
1240fab4ad404417bd439a1a1b0c36d00790d3e0 | Simon Sapin | 2015-02-07T03:58:40 | Upgrade to rustc 1.0.0-nightly (706be5ba1 2015-02-05 23:14:28 +0000) | diff --git a/mod_path/build.rs b/mod_path/build.rs
index d9c88f5..c8bf243 100644
--- a/mod_path/build.rs
+++ b/mod_path/build.rs
@@ -1,10 +1,10 @@
-#![feature(os, path, io)]
+#![feature(env, path, io)]
-use std::os;
+use std::env;
use std::old_io::File;
fn main() {
- let dst = Path::new(os::getenv("OUT_DIR").u... | 4 | 7 | 8 |
270d180cfbd874d16e99b9fa63cc3da99d4e14d5 | Simon Sapin | 2015-01-31T13:53:28 | mod_path 0.1.1 | diff --git a/mod_path/Cargo.toml b/mod_path/Cargo.toml
index c29171d..cbfb04c 100644
--- a/mod_path/Cargo.toml
+++ b/mod_path/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "mod_path"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.... | 1 | 1 | 1 |
627c087206bd44c845f85c08c5892de2301fb103 | Simon Sapin | 2015-01-29T17:03:24 | Upgrade to rustc 1.0.0-nightly (c5961ad06 2015-01-28 21:49:38 +0000) | diff --git a/text_writer/lib.rs b/text_writer/lib.rs
index dd719a5..f5f5999 100644
--- a/text_writer/lib.rs
+++ b/text_writer/lib.rs
@@ -1,8 +1,11 @@
+#![feature(core, unicode)]
+#![cfg_attr(test, feature(collections))]
+
use std::fmt::{self, Writer};
use std::mem;
/// Indicates some kind of error during writing, ... | 3 | 8 | 6 |
d32ffda5e8b13b5970100a808e16aa2c468012f5 | Simon Sapin | 2015-01-10T01:26:58 | Upgrade to rustc 1.0.0-dev (a9be50e28 2015-01-09 19:44:50 +0000) | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index b8105cb..124ee8a 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "matches"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/S... | 8 | 50 | 49 |
6b5fd41bb60ab6f85106013c576972f642383f29 | Simon Sapin | 2015-01-05T17:08:45 | Bump matches version number and publish. | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index 1ad6b31..b8105cb 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "matches"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/S... | 1 | 1 | 1 |
d50b202db6e8e8b85076e2e322030ce0127c3128 | Simon Sapin | 2015-01-05T09:27:04 | Upgrade to rustc 0.13.0-nightly (c6c786671 2015-01-04 00:50:59 +0000) | diff --git a/zip-longest/Cargo.toml b/zip-longest/Cargo.toml
index bd66400..fc8e186 100644
--- a/zip-longest/Cargo.toml
+++ b/zip-longest/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "zip-longest"
-version = "0.1.2"
+version = "0.1.3"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "... | 2 | 17 | 16 |
772a0b4c13f4b10bcba2a794385876b1ff268371 | Simon Sapin | 2014-12-29T21:46:52 | Upgrade to rustc 0.13.0-dev (03a1188cf 2014-12-29 05:22:26 +0000) | diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index ff35acf..8770995 100644
--- a/text_writer/Cargo.toml
+++ b/text_writer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "text_writer"
-version = "0.1.5"
+version = "0.1.6"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "ht... | 2 | 2 | 2 |
a9252e6bace6d506a444018d0c3de990d2a51d93 | Simon Sapin | 2014-12-25T11:59:15 | Upgrade to rustc 0.13.0-nightly (96a3c7c6a 2014-12-23 22:21:10 +0000) | diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index 2c3b5c5..ff35acf 100644
--- a/text_writer/Cargo.toml
+++ b/text_writer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "text_writer"
-version = "0.1.4"
+version = "0.1.5"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "ht... | 4 | 5 | 7 |
537364a51675eb0a46d506fc4e9a84ad39bfa7f7 | Simon Sapin | 2014-12-20T22:28:09 | Add doc comments in text_writer | diff --git a/text_writer/lib.rs b/text_writer/lib.rs
index 9443035..64c8054 100644
--- a/text_writer/lib.rs
+++ b/text_writer/lib.rs
@@ -2,22 +2,35 @@ use std::fmt::{mod, FormatWriter};
use std::mem;
use std::str;
+/// Indicates some kind of error during writing, but does not provide further details.
#[deriving(Co... | 1 | 13 | 0 |
0f0aca942c3a5dae09d60d5f1ae917a1bcaf9c63 | Simon Sapin | 2014-12-20T22:20:26 | Add a default implementation of TextWriter::write_char. | diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index 01526ba..2c3b5c5 100644
--- a/text_writer/Cargo.toml
+++ b/text_writer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "text_writer"
-version = "0.1.3"
+version = "0.1.4"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "ht... | 2 | 8 | 2 |
ebc0881b7a7fcfbd5b89d66600ad8a316461fec7 | Simon Sapin | 2014-12-20T21:23:44 | Upgrade to rustc 0.13.0-nightly (99d6956c3 2014-12-18 20:32:07 +0000) | diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index 190235d..01526ba 100644
--- a/text_writer/Cargo.toml
+++ b/text_writer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "text_writer"
-version = "0.1.2"
+version = "0.1.3"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "ht... | 2 | 3 | 3 |
f7a4555d789830771523fc5901ee90b93eb6e398 | Simon Sapin | 2014-12-20T21:22:09 | Make TextWriter::write_fmt streaming (and return Err on non-UTF-8 bytes.) | diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index 80bc98b..190235d 100644
--- a/text_writer/Cargo.toml
+++ b/text_writer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "text_writer"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "ht... | 2 | 15 | 5 |
379749db144c2d44c9c9a231f6f7653c67371e7a | Simon Sapin | 2014-12-20T20:40:44 | Make TextWriter usable with `write!` (i.e. add a `write_fmt` method). | diff --git a/text_writer/Cargo.toml b/text_writer/Cargo.toml
index 08699e1..80bc98b 100644
--- a/text_writer/Cargo.toml
+++ b/text_writer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "text_writer"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "ht... | 2 | 15 | 7 |
b9024478d3b376f3945a214a08fd0e647b67b8af | Simon Sapin | 2014-12-19T20:21:24 | Upgrade to rustc 0.13.0-nightly (99d6956c3 2014-12-18 20:32:07 +0000) | diff --git a/matches/lib.rs b/matches/lib.rs
index 1bf7892..4232703 100644
--- a/matches/lib.rs
+++ b/matches/lib.rs
@@ -11,7 +11,7 @@ macro_rules! matches(
_ => false
}
);
-)
+);
#[test]
fn it_works() {
@@ -19,5 +19,5 @@ fn it_works() {
assert!(matches!(foo, Some(bar) if
ma... | 2 | 5 | 5 |
70c4a9b4b8dbe7ca9ca371a7bedbe72a559847a9 | Simon Sapin | 2014-12-05T02:31:30 | Repuplish matches as 0.1.0, so that future 0.1.x are compatible per semver. | diff --git a/matches/Cargo.toml b/matches/Cargo.toml
index 790ab33..e3d544e 100644
--- a/matches/Cargo.toml
+++ b/matches/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "matches"
-version = "0.0.1"
+version = "0.1.0"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "https://github.com/S... | 1 | 1 | 1 |
f2956e9b4484d98fede9380ff9abc1a7064b8d4f | Simon Sapin | 2014-12-05T00:33:53 | Document EitherOrBoth | diff --git a/zip-longest/lib.rs b/zip-longest/lib.rs
index 662fd31..62a7814 100644
--- a/zip-longest/lib.rs
+++ b/zip-longest/lib.rs
@@ -69,7 +69,7 @@ for ZipLongest<T, U> {
Equal => match (self.a.next_back(), self.b.next_back()) {
(None, None) => None,
(Some(a), Some(b)) ... | 1 | 11 | 2 |
cd07a9ac30bbd93b6969fa783be3d5caf88b5a70 | Simon Sapin | 2014-12-05T00:10:03 | Switch zip_longest to use an EitherOrBoth custom enum instead of a pair of option. | diff --git a/zip-longest/Cargo.toml b/zip-longest/Cargo.toml
index 0c146c1..c423aaf 100644
--- a/zip-longest/Cargo.toml
+++ b/zip-longest/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "zip-longest"
-version = "0.0.1"
+version = "0.1.0"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
repository = "... | 2 | 34 | 19 |
239d236e6dd756b15d50c1d6eef5703b7f28bc61 | Thom Chiovoloni | 2023-01-09T06:38:19 | Prep release 2.0.2 | diff --git a/Cargo.toml b/Cargo.toml
index 0d710ec..0375e83 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "typed-arena"
-version = "2.0.1"
-authors = ["Simon Sapin <simon.sapin@exyr.org>", "Nick Fitzgerald <fitzgen@gmail.com>"]
+version = "2.0.2"
+authors = ["The typed-arena developers"]
... | 1 | 2 | 2 |
b92091aaabdb7f36571c8302fbe8e17a7327354c | Thom Chiovoloni | 2023-01-09T06:28:30 | Avoid invalidating provenance of outstanding references in `alloc_extend`. Fixes #55 | diff --git a/src/lib.rs b/src/lib.rs
index 2c52cde..ec5ff32 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -264,14 +264,16 @@ impl<T> Arena<T> {
i += 1;
}
}
- let new_slice_ref = &mut chunks.current[next_item_index..];
// Extend the lifetime from that of `chunks_bor... | 2 | 15 | 2 |
6e8f574228327419d104b08bafcb52e0ff98a0dd | Thom Chiovoloni | 2023-01-09T06:22:47 | Remove `#[cfg_attr(miri, ignore)]` from tests | diff --git a/src/test.rs b/src/test.rs
index 9be77a5..a981c4a 100644
--- a/src/test.rs
+++ b/src/test.rs
@@ -322,12 +322,11 @@ fn size_hint() {
}
#[test]
-#[cfg_attr(miri, ignore)]
fn size_hint_low_initial_capacities() {
#[derive(Debug, PartialEq, Eq)]
struct NonCopy(usize);
- const MAX: usize = 25_... | 1 | 3 | 6 |
400b56b8cc49ffe3f6ade21c248f76728caa5b77 | Thom Chiovoloni | 2023-01-09T05:15:59 | Run `rustfmt` | diff --git a/benches/benches.rs b/benches/benches.rs
index 5fbe054..4312a8d 100644
--- a/benches/benches.rs
+++ b/benches/benches.rs
@@ -2,7 +2,7 @@
extern crate criterion;
extern crate typed_arena;
-use criterion::{Criterion, BenchmarkId};
+use criterion::{BenchmarkId, Criterion};
#[derive(Default)]
struct Sma... | 3 | 14 | 14 |
3089aa01ce72ec48ae14d49098c757393412bd00 | Eduardo Sánchez Muñoz | 2021-02-18T12:02:45 | Fix deprecation warnings from criterion | diff --git a/Cargo.toml b/Cargo.toml
index 7bca1a1..0d710ec 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,7 @@ default = ["std"]
std = []
[dev-dependencies]
-criterion = "0.3.0"
+criterion = "0.3.4"
[[bench]]
name = "benches"
diff --git a/benches/benches.rs b/benches/benches.rs
index cae24d5..5fbe054 10... | 2 | 17 | 21 |
22422d47fafac4cb238a578c3f4a68f2d2304c1d | Ralf Jung | 2019-12-07T10:53:19 | ignore tests on miri instead of excluding them from compilation | diff --git a/src/test.rs b/src/test.rs
index 6e6dfd0..7b23e75 100644
--- a/src/test.rs
+++ b/src/test.rs
@@ -318,7 +318,7 @@ fn size_hint() {
}
#[test]
-#[cfg(not(miri))]
+#[cfg_attr(miri, ignore)]
fn size_hint_low_initial_capacities() {
#[derive(Debug, PartialEq, Eq)]
struct NonCopy(usize);
@@ -337,7 +3... | 1 | 3 | 3 |
d6ba9550a5fe06900a65193235312cffd7964527 | Michal 'vorner' Vaner | 2019-11-27T17:07:27 | Fix links around alloc_unitialized
Fix some broken links introduced in #40. | diff --git a/src/lib.rs b/src/lib.rs
index 6e2541c..f9688cb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -283,7 +283,7 @@ impl<T> Arena<T> {
/// will run destructors on the uninitialized memory. Therefore, you must initialize them.
///
/// Considering how easy it is to cause undefined behaviour using this... | 1 | 11 | 10 |
0e21154fb141e60a8a1caaf0041b60cbfd14ad30 | Michal 'vorner' Vaner | 2019-11-25T21:00:14 | Use MaybeUninit while manipulating uninitialized data
Because there's no way to manipulate unitialized data to some data types
just through references.
Adding Arena::reserve_extend to allow a somewhat safer pattern how to
initialize the memory without risk of causing UB by panicking before
full initialization, causin... | diff --git a/src/lib.rs b/src/lib.rs
index edc5cac..a8ca567 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -73,6 +73,8 @@ use core::iter;
use core::mem;
use core::slice;
+use mem::MaybeUninit;
+
#[cfg(test)]
mod test;
@@ -273,24 +275,77 @@ impl<T> Arena<T> {
/// Allocates space for a given number of values,... | 2 | 157 | 24 |
48e04b3ac3b742f289d5e4625565545431b1d9e4 | Maxwell Anderson | 2019-10-31T01:17:02 | add debug_assert checks before alloc reserve calls | diff --git a/src/lib.rs b/src/lib.rs
index 1547c68..edc5cac 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -150,11 +150,11 @@ impl<T> Arena<T> {
///
/// ```
/// use typed_arena::Arena;
- ///
+ ///
/// let arena = Arena::with_capacity(0);
/// let a = arena.alloc(1);
/// let b = aren... | 1 | 10 | 2 |
f09aa2fa6c5fb393a9486b27a680e02c34c24bb5 | Maxwell Anderson | 2019-10-30T13:52:47 | add len method to Arena | diff --git a/benches/benches.rs b/benches/benches.rs
index df63f06..cae24d5 100644
--- a/benches/benches.rs
+++ b/benches/benches.rs
@@ -25,7 +25,8 @@ fn criterion_benchmark(c: &mut Criterion) {
"allocate-small",
|b, n| b.iter(|| allocate::<Small>(*n)),
(1..5).map(|n| n * 1000).co... | 3 | 42 | 17 |
1aad92144ebc19f591476f4bbc0b90970ea8a5e9 | Maxwell Anderson | 2019-10-30T13:08:34 | avoid integer overflows | diff --git a/src/lib.rs b/src/lib.rs
index 8df3b29..794bf9a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -201,7 +201,8 @@ impl<T> Arena<T> {
let iter_min_len = iter.size_hint().0;
let mut next_item_index;
- if chunks.current.len() + iter_min_len > chunks.current.capacity() {
+ // if chu... | 1 | 4 | 2 |
8952af27b8e88b01dd7c0759069018f1887ff2bb | Igor Gnatenko | 2019-09-21T11:30:51 | chore: Update criterion to 0.3 | diff --git a/Cargo.toml b/Cargo.toml
index 8b469e8..55d7d83 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,7 @@ default = ["std"]
std = []
[dev-dependencies]
-criterion = "0.2.4"
+criterion = "0.3"
[[bench]]
name = "benches" | 1 | 1 | 1 |
0393f9ddd6b23116ad6e0ec5e3c1a25141ae12ae | Nick Fitzgerald | 2019-09-09T17:46:42 | Use loop instead of recursion in `IterMut::next` | diff --git a/src/lib.rs b/src/lib.rs
index fac7c8b..d47550b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -444,32 +444,34 @@ pub struct IterMut<'a, T: 'a> {
impl<'a, T> Iterator for IterMut<'a, T> {
type Item = &'a mut T;
fn next(&mut self) -> Option<&'a mut T> {
- match self.state {
- IterMu... | 1 | 24 | 22 |
3153cf84b1ba030186d2452b75f1fd9207c0d014 | Aaron Loucks | 2019-08-31T22:30:05 | Use inner iterators instead of raw indices | diff --git a/src/lib.rs b/src/lib.rs
index fcd2f7e..fac7c8b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -375,13 +375,26 @@ impl<T> Arena<T> {
/// // borrow error!
/// *x = 2;
/// ```
- pub fn iter_mut(&mut self) -> IterMut<'_, T> {
+ #[inline]
+ pub fn iter_mut(&mut self) -> IterMut<T> {
+ ... | 1 | 51 | 50 |
f40a958e74150bc600301160d8d7cc1399e75f96 | Aaron Loucks | 2019-08-24T20:57:22 | Fix size_hint tests for miri | diff --git a/src/test.rs b/src/test.rs
index e21a75e..16959ec 100644
--- a/src/test.rs
+++ b/src/test.rs
@@ -248,6 +248,25 @@ fn assert_size_hint<T>(arena_len: usize, iter: IterMut<'_, T>) {
}
#[test]
+fn size_hint() {
+ #[derive(Debug, PartialEq, Eq)]
+ struct NonCopy(usize);
+
+ const MAX: usize = 32;
+ ... | 1 | 21 | 0 |
227bf76645b2635e4054c737d4cde0e8f09ebabc | Aaron Loucks | 2019-08-24T20:08:14 | Add mutable iteration over arena contents | diff --git a/src/lib.rs b/src/lib.rs
index 274cbcc..fcd2f7e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -328,6 +328,62 @@ impl<T> Arena<T> {
result.append(&mut chunks.current);
result
}
+
+ /// Returns an iterator that allows modifying each value.
+ ///
+ /// Items are yielded in the ord... | 2 | 259 | 0 |
7adf30d3c40853030d237c118a95a564f4a59725 | Ralf Jung | 2019-08-02T07:16:51 | fix for Stacked Borrows | diff --git a/src/lib.rs b/src/lib.rs
index 3b4d133..274cbcc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -165,9 +165,13 @@ impl<T> Arena<T> {
#[inline]
fn alloc_fast_path(&self, value: T) -> Result<&mut T, T> {
let mut chunks = self.chunks.borrow_mut();
- if chunks.current.len() < chunks.curren... | 1 | 6 | 2 |
6907fab3e23a2410a4f4dbbfe413f21a6507093e | Nick Fitzgerald | 2018-08-18T21:48:28 | chore: rustfmt everything | diff --git a/src/lib.rs b/src/lib.rs
index c5e0780..30e101e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -190,7 +190,8 @@ impl<T> Arena<T> {
/// assert_eq!(abc, ['a', 'b', 'c']);
/// ```
pub fn alloc_extend<I>(&self, iterable: I) -> &mut [T]
- where I: IntoIterator<Item = T>
+ where
+ I: ... | 2 | 29 | 21 |
4c2a69d273aef2d3cc28a83c05391051650299b4 | Nick Fitzgerald | 2018-08-18T21:45:17 | Add a fast path for allocations where we have capacity | diff --git a/src/lib.rs b/src/lib.rs
index 5ea427f..c5e0780 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -156,7 +156,24 @@ impl<T> Arena<T> {
/// let x = arena.alloc(42);
/// assert_eq!(*x, 42);
/// ```
+ #[inline]
pub fn alloc(&self, value: T) -> &mut T {
+ self.alloc_fast_path(value)
+ ... | 1 | 17 | 0 |
6ecc2c55fb0aebc599f2929873298078e1c7025e | Nick Fitzgerald | 2018-08-18T19:55:47 | Introduce criterion benchmarks for allocation | diff --git a/Cargo.toml b/Cargo.toml
index 9edea40..d0b5522 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,3 +16,14 @@ path = "src/lib.rs"
[features]
default = ["std"]
std = []
+
+[dev-dependencies]
+criterion = "0.2.4"
+
+[[bench]]
+name = "benches"
+path = "benches/benches.rs"
+harness = false
+
+[profile.bench]
... | 2 | 53 | 0 |
125e1a3b5d560b893afe91ea08ca6647463a61fa | Krystal Maughan | 2018-08-18T20:00:27 | Fix vec in lib.rs
Uses old syntax for vec | diff --git a/src/lib.rs b/src/lib.rs
index d0e8b84..5ea427f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -67,7 +67,7 @@ extern crate alloc;
extern crate core;
#[cfg(not(feature = "std"))]
-use alloc::Vec;
+use alloc::vec::Vec;
use core::cell::RefCell;
use core::cmp; | 1 | 1 | 1 |
492595b5f74c48100191a49e9584d43fc62242a6 | Daniel Nugent | 2018-07-03T20:40:36 | Add keyword "arena" to crate | diff --git a/Cargo.toml b/Cargo.toml
index 4836477..9edea40 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,6 +7,7 @@ description = "The arena, a fast but limited type of allocator"
documentation = "https://docs.rs/typed-arena"
repository = "https://github.com/SimonSapin/rust-typed-arena"
categories = ["memory-manage... | 1 | 1 | 0 |
636341405770dc2f9348c9d44aee6f558c295582 | Nick Fitzgerald | 2018-06-30T06:12:04 | Add a bunch of examples to the documentation comments
Also expand on some method descriptions a little bit.
Also deny missing documentation going forward. | diff --git a/Cargo.toml b/Cargo.toml
index 2bb5769..86ab396 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,6 @@ categories = ["memory-management", "no-std"]
[lib]
name = "typed_arena"
path = "src/lib.rs"
-doctest = false
[features]
default = ["std"]
diff --git a/src/lib.rs b/src/lib.rs
index 8e21e27..d0e8... | 2 | 138 | 1 |
2ec219d33d0208e8f82d39863526d6242361d2cb | Nick Fitzgerald | 2018-06-30T06:10:21 | Add a test that asserts that Arena is Send
Somewhat easy to accidentally break this auto trait without realizing it, so a
test is a good sanity check. | diff --git a/src/test.rs b/src/test.rs
index cba6313..d1a169a 100644
--- a/src/test.rs
+++ b/src/test.rs
@@ -171,3 +171,15 @@ fn dont_trust_the_iterator_size() {
assert_eq!(arena.chunks.borrow().rest.len(), 1);
assert_eq!(slice.len(), 1000);
}
+
+#[test]
+fn arena_is_send() {
+ fn assert_is_send<T: Send>(... | 1 | 12 | 0 |
264ade9b78a11db4425e4ff05cbc0ca79a58e879 | Nick Fitzgerald | 2018-06-30T05:04:30 | Clarify that `Arena` has been removed from Rust's standard libraries | diff --git a/src/lib.rs b/src/lib.rs
index 893bac2..8e21e27 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -5,9 +5,10 @@
//! They do not support deallocation of individual objects while the arena itself is still alive.
//! The benefit of an arena is very fast allocation; just a vector push.
//!
-//! This is an equivale... | 1 | 3 | 2 |
d1c7c387c65744f2121a1f51757691d3274c8fb9 | Nick Fitzgerald | 2018-06-30T05:03:15 | Fix link to the old Rust `Arena` docs | diff --git a/src/lib.rs b/src/lib.rs
index ccfab2b..893bac2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -6,7 +6,7 @@
//! The benefit of an arena is very fast allocation; just a vector push.
//!
//! This is an equivalent of
-//! [`arena::TypedArena`](http://doc.rust-lang.org/arena/struct.TypedArena.html)
+//! [`arena... | 1 | 1 | 1 |
2a883e26a8d44530a4dbfd3d6dc26ef359b3cb6b | Tony Arcieri | 2017-06-02T19:56:54 | Support no_std by gating std usage on a "std" feature flag
This adds an enabled-by-default "std" cargo feature which can be selectively
removed to enable no_std support.
When the "std" feature is absent, feature(alloc) will be enabled to
provide Vec support. This requires nightly, but since "std" is enabled by
defaul... | diff --git a/Cargo.toml b/Cargo.toml
index 87edee3..c94523c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,9 +6,13 @@ license = "MIT"
description = "The arena, a fast but limited type of allocator"
documentation = "https://docs.rs/typed-arena"
repository = "https://github.com/SimonSapin/rust-typed-arena"
-categories... | 2 | 23 | 7 |
fd2af6e1b1168f09bbd98aae1a9c2a3ede9a6dc9 | Piotr Czarnecki | 2017-05-04T14:15:10 | Bump minor version to 1.3.0 | diff --git a/Cargo.toml b/Cargo.toml
index d826b9a..87edee3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "typed-arena"
-version = "1.2.0"
+version = "1.3.0"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
description = "The arena, a fast but limited type of allocator" | 1 | 1 | 1 |
03219ba78fe27fffb5d2b3decac8b91ec0368d50 | Markus Westerlind | 2017-04-02T13:16:25 | fix: Don't trust the length reported by the ExactSizeIterator trait
Since the `ExactSizeIterator` trait is not an unsafe trait we can't trust the length it reports when creating the slice. Doing so would make it possible to pass an iterator to `alloc_extend` which is larger than the length it reports, causing the aren... | diff --git a/src/lib.rs b/src/lib.rs
index 52ed774..d4cc390 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -51,7 +51,7 @@ impl<T> Arena<T> {
Arena {
chunks: RefCell::new(ChunkList {
current: Vec::with_capacity(n),
- rest: vec![]
+ rest: vec![],
... | 2 | 65 | 12 |
e1b0914ffd159bccefe5d8da906623015966b10c | Jake Goulding | 2017-01-20T16:34:21 | Add categories to Cargo.toml | diff --git a/Cargo.toml b/Cargo.toml
index c2e9eda..d826b9a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,6 +6,7 @@ license = "MIT"
description = "The arena, a fast but limited type of allocator"
documentation = "https://docs.rs/typed-arena"
repository = "https://github.com/SimonSapin/rust-typed-arena"
+categories ... | 1 | 1 | 0 |
d96b3b680aa080cad0fbc07c35de5c690be406c3 | Piotr Czarnecki | 2016-05-20T17:09:02 | Cargo.toml: Minor version bump | diff --git a/Cargo.toml b/Cargo.toml
index 17cc1d3..a155075 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "typed-arena"
-version = "1.1.0"
+version = "1.2.0"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
description = "The arena, a fast but limited type of allocator" | 1 | 1 | 1 |
cc178167e6e1f84bb0a0d10cfbc30f27dd139cad | Piotr Czarnecki | 2016-05-20T17:08:10 | Add tests | diff --git a/src/test.rs b/src/test.rs
index 62d675b..ae0f1c2 100644
--- a/src/test.rs
+++ b/src/test.rs
@@ -1,18 +1,19 @@
+use std::cell::Cell;
+use std::mem;
+use std::ptr;
use super::*;
-#[test]
-fn arena_as_intended() {
- use std::cell::Cell;
- use std::mem;
-
- struct DropTracker<'a>(&'a Cell<u32>);
- ... | 1 | 83 | 12 |
d170bf9fc2800eb85d36a02c1c1b6d1983cc7e93 | Piotr Czarnecki | 2016-05-20T18:18:59 | Document some methods | diff --git a/src/lib.rs b/src/lib.rs
index 7f3d57e..52ed774 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -56,10 +56,14 @@ impl<T> Arena<T> {
}
}
+ /// Allocates a value in the arena, and returns a mutable reference
+ /// to that value.
pub fn alloc(&self, value: T) -> &mut T {
&mut se... | 1 | 6 | 0 |
238828687e31863b5e31ccb8410fcef808d818f0 | Piotr Czarnecki | 2016-05-20T17:07:57 | Implement alloc_extend, alloc_uninitialized,
uninitialized_array. | diff --git a/src/lib.rs b/src/lib.rs
index b447566..7f3d57e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -19,7 +19,9 @@
use std::cell::RefCell;
use std::cmp;
+use std::iter;
use std::mem;
+use std::slice;
#[cfg(test)]
mod test;
@@ -55,27 +57,57 @@ impl<T> Arena<T> {
}
pub fn alloc(&self, value: T) -... | 2 | 47 | 15 |
b6e40306d86f1992ad07340db7265c582fd6b7c9 | Jonas Tepe | 2016-01-02T11:12:59 | Refactored tests into separate module | diff --git a/Cargo.toml b/Cargo.toml
index f4715ff..17cc1d3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,5 +8,5 @@ repository = "https://github.com/SimonSapin/rust-typed-arena"
[lib]
name = "typed_arena"
-path = "lib.rs"
+path = "src/lib.rs"
doctest = false
diff --git a/lib.rs b/src/lib.rs
similarity index 59%
r... | 3 | 76 | 67 |
9a3423754c75f1b3115fb1f7f1cf1dfbe06d5d1b | Georg Brandl | 2015-12-30T12:12:24 | Keep order of allocation in into_vec(). | diff --git a/lib.rs b/lib.rs
index 2bda616..fa7d784 100644
--- a/lib.rs
+++ b/lib.rs
@@ -76,11 +76,14 @@ impl<T> Arena<T> {
}
pub fn into_vec(self) -> Vec<T> {
- let chunks = self.chunks.into_inner();
- let mut result = chunks.current;
+ let mut chunks = self.chunks.into_inner();
+ ... | 1 | 6 | 6 |
78640995de15326f87f87f138a5bef91eaecb636 | Piotr Czarnecki | 2015-08-08T08:41:41 | Refactored Arena's internals. Optimization.
The current chunk is stored separately. | diff --git a/lib.rs b/lib.rs
index 371c2ec..2f7bfc6 100644
--- a/lib.rs
+++ b/lib.rs
@@ -5,56 +5,85 @@
//! They do not support deallocation of individual objects while the arena itself is still alive.
//! The benefit of an arena is very fast allocation; just a vector push.
//!
-//! This is an equivalent to [`arena::... | 1 | 63 | 34 |
fc8198a971c8fc0c6148066846f5ae23b4bf12da | Simon Sapin | 2015-04-10T16:55:27 | Add repository link | diff --git a/Cargo.toml b/Cargo.toml
index 0a056fe..e76a048 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,9 +1,10 @@
[package]
name = "typed-arena"
-version = "1.0.0"
+version = "1.0.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
license = "MIT"
description = "The arena, a fast but limited type of allocator"... | 1 | 2 | 1 |
733034c7bdab5a89f9211b81963ad3c4fd00dc20 | Stu Black | 2019-01-07T02:44:18 | Minor version number bump for recent extensions to error types. | diff --git a/Cargo.toml b/Cargo.toml
index 9277c54..659f5a4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "utf-8"
-version = "0.7.4"
+version = "0.7.5"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
description = "Incremental, zero-copy UTF-8 decoding with error handling"
license = "M... | 1 | 1 | 1 |
45e92102d411912302d8b9c3559d84f7e817943b | Stu Black | 2019-01-07T02:43:25 | Try to make the Display impls for error variants easier to read. | diff --git a/src/lib.rs b/src/lib.rs
index 9c06f5c..ec223f2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,16 +33,29 @@ pub enum DecodeError<'a> {
impl<'a> fmt::Display for DecodeError<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
- DecodeError::Invalid { valid_pr... | 1 | 23 | 10 |
19b48caee6d723d1797e8dfc07586344757a95c3 | Stu Black | 2019-01-01T00:00:15 | Provide more comprehensive Display impls for DecodeError, too. | diff --git a/src/lib.rs b/src/lib.rs
index 9246c82..9c06f5c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,8 +33,16 @@ pub enum DecodeError<'a> {
impl<'a> fmt::Display for DecodeError<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
- DecodeError::Invalid { .. } => w... | 1 | 10 | 2 |
ee822f9f76d0598320bfecf772acc0c47ad48044 | Stu Black | 2018-12-31T23:50:07 | InvalidByteSequence should share what that byte sequence is.
I also hit the affected hunk with 'cargo fmt' because the lines were getting a
little long. | diff --git a/src/read.rs b/src/read.rs
index e23af42..5e38f54 100644
--- a/src/read.rs
+++ b/src/read.rs
@@ -35,10 +35,12 @@ impl<'a> BufReadDecoderError<'a> {
impl<'a> fmt::Display for BufReadDecoderError<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- match *self {
- BufReadDecode... | 1 | 6 | 4 |
1a8bac887ca9220a33a1f9763b68dfc7601fdb31 | Stu Black | 2018-12-18T03:35:09 | Implement Error for DecodeError and BufReadDecoderError. | diff --git a/src/lib.rs b/src/lib.rs
index efe2313..9246c82 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -5,6 +5,8 @@ pub use lossy::LossyDecoder;
pub use read::{BufReadDecoder, BufReadDecoderError};
use std::cmp;
+use std::error::Error;
+use std::fmt;
use std::str;
/// The replacement character, U+FFFD. In loss... | 2 | 34 | 0 |
98ba362f11e2439005945839ded138470cf497b0 | Simon Sapin | 2018-07-31T17:46:48 | Typo fix | diff --git a/Cargo.toml b/Cargo.toml
index fbd6c9c..9277c54 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "utf-8"
-version = "0.7.3"
+version = "0.7.4"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
description = "Incremental, zero-copy UTF-8 decoding with error handling"
license = "M... | 2 | 2 | 2 |
30cf3d05b88e4db5cc37d2a8db48d5a295c95a44 | Simon Sapin | 2018-07-31T17:05:43 | Add BufReadDecoder::read_to_string_lossy | diff --git a/src/read.rs b/src/read.rs
index 72df4b3..0519ece 100644
--- a/src/read.rs
+++ b/src/read.rs
@@ -31,6 +31,16 @@ impl<'a> BufReadDecoderError<'a> {
}
impl<B: BufRead> BufReadDecoder<B> {
+ /// This is to `Read::read_to_string` what `String::from_utf8_lossy` is to `String::from_utf8`.
+ pub fn read_... | 2 | 12 | 5 |
38ee58c8192a46c993e21c8b48e512acc0507327 | Simon Sapin | 2018-07-31T16:49:51 | Tweak BufReadDecoder API | diff --git a/src/read.rs b/src/read.rs
index efb6725..72df4b3 100644
--- a/src/read.rs
+++ b/src/read.rs
@@ -2,19 +2,32 @@ use std::io::{self, BufRead};
use std::str;
use super::*;
-/// Wraps a `std::io::BufRead` bufferred byte stream and decode it as UTF-8.
+/// Wraps a `std::io::BufRead` buffered byte stream and ... | 2 | 43 | 30 |
fa6bce35596cd1448ff309de12510ef7f69503fc | Simon Sapin | 2018-07-31T13:11:40 | Add BufReadDecoderError | diff --git a/Cargo.toml b/Cargo.toml
index e83b422..fbd6c9c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "utf-8"
-version = "0.7.2"
+version = "0.7.3"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
description = "Incremental, zero-copy UTF-8 decoding with error handling"
license = "M... | 4 | 232 | 39 |
09fb520197dac4ac562a216b26302c6354b65409 | Simon Sapin | 2018-07-31T12:50:25 | Move unit tests into a single file | diff --git a/tests/decoder.rs b/tests/decoder.rs
deleted file mode 100644
index 0f1b5b3..0000000
--- a/tests/decoder.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-extern crate utf8;
-
-use utf8::LossyDecoder;
-
-#[path = "shared/data.rs"]
-mod data;
-
-#[test]
-fn test_incremental_decoder() {
- let mut chunks = Vec::new();
- ... | 6 | 146 | 157 |
fc6795e2d5884b067889c0689a8697fb8eae9237 | Simon Sapin | 2018-01-27T07:12:09 | std::str::Utf8Error::error_len is stable since Rust 1.20 | diff --git a/Cargo.toml b/Cargo.toml
index 7de5d1b..e83b422 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "utf-8"
-version = "0.7.1"
+version = "0.7.2"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
description = "Incremental, zero-copy UTF-8 decoding with error handling"
license = "M... | 3 | 3 | 113 |
f0fb2aac57f9ad3302f1ba3e35bda246957a2ab6 | Simon Sapin | 2017-05-14T08:08:08 | Add Incomplete::empty and is_empty | diff --git a/Cargo.toml b/Cargo.toml
index 1e904d0..7de5d1b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "utf-8"
-version = "0.7.0"
+version = "0.7.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
description = "Incremental, zero-copy UTF-8 decoding with error handling"
license = "M... | 3 | 13 | 2 |
6534f1b9ca93be712ac97b90a2a1d3acfb2410e2 | Simon Sapin | 2017-03-07T00:39:32 | Lifetime elision defaults to self. | diff --git a/src/lib.rs b/src/lib.rs
index ccb2856..cd28136 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -78,10 +78,10 @@ impl Incomplete {
/// * `None`: still incomplete, call `try_complete` again with more input.
/// If no more input is available, this is invalid byte sequence.
- /// * `Some((result, ... | 1 | 4 | 4 |
b6f5659d9c7e7c2bc9e8ce211fcbc1fb34058941 | Simon Sapin | 2017-03-07T00:21:09 | IncompleteChar -> Incomplete. It can decode more than one `char`. | diff --git a/src/lib.rs b/src/lib.rs
index f4a1fcd..ccb2856 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -25,12 +25,12 @@ pub enum DecodeError<'a> {
/// If no more input is available, this is an invalid byte sequence.
Incomplete {
valid_prefix: &'a str,
- incomplete_suffix: IncompleteChar,
+ ... | 2 | 8 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.