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 |
|---|---|---|---|---|---|---|---|
7db9ba77b7d08876418f1e87a7c8e7e62a8a0ec5 | Cody P Schafer | 2016-01-18T18:31:44 | imp/unix: always cast cstr.as_ptr() to avoid issues with differing c_char types | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 97687d4..24089d5 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -93,16 +93,18 @@ pub fn persist(old_path: &Path, new_path: &Path, overwrite: bool) -> io::Result<
let old_path = try!(cstr(old_path));
let new_path = try!(cstr(new_path));
... | 1 | 5 | 3 |
34e42b9fdd931ad694900b0afd7c7553a4ac8dd0 | Steven Allen | 2015-12-02T01:39:21 | Fix doctest on windows | diff --git a/src/named.rs b/src/named.rs
index f24b2d5..409b4de 100644
--- a/src/named.rs
+++ b/src/named.rs
@@ -240,7 +240,7 @@ impl std::os::windows::io::AsRawHandle for NamedTempFile {
/// .prefix("hogehoge")
/// .suffix(".rs")
/// .rand_byte... | 1 | 1 | 1 |
3dbcaaecc1d5c8e9b566735ffc4f5ada1b0966ee | Steven Allen | 2015-12-01T20:57:40 | Named tempfile nits. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index eb53038..6b53d90 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -1,12 +1,12 @@
-use ::libc::{self, c_int, O_EXCL, O_RDWR, O_CREAT, O_CLOEXEC};
-use ::libc::stat as stat_t;
+use libc::{self, c_int, O_EXCL, O_RDWR, O_CREAT, O_CLOEXEC};
+use libc::stat as stat_t;... | 6 | 100 | 102 |
ddf3f710f4e28b43f53a5174a02745cc80629c68 | Sunrin SHIMURA (keen) | 2015-12-01T16:58:55 | Allow custom named temporary files | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 1fbd537..eb53038 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -6,7 +6,7 @@ use std::io;
use std::os::unix::io::{RawFd, FromRawFd, AsRawFd};
use std::fs::{self, File, OpenOptions};
use std::path::Path;
-use ::util::tmpname;
+use named::CustomNamedTempFile;... | 6 | 131 | 39 |
ff177869d88814d7efd47820c112a8265adb903f | Steven Allen | 2015-11-30T17:12:59 | Add persist_noclobber.
Allows persisting a named temporary file without clobbering an existing
target. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index c510360..1fbd537 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -140,6 +140,22 @@ pub fn create_shared(dir: &Path, count: usize) -> io::Result<Vec<File>> {
"too many temporary directories already exist"))
}
-pub fn persist(old_path: ... | 4 | 85 | 16 |
6df33e8a82e956433a43d63d6cf0f092c3d6dfa1 | Steven Allen | 2015-11-30T17:12:35 | impl From for converting PersistError to NamedTempFile | diff --git a/src/named.rs b/src/named.rs
index 9ba7386..d2ccba7 100644
--- a/src/named.rs
+++ b/src/named.rs
@@ -64,6 +64,13 @@ impl From<PersistError> for io::Error {
}
}
+impl From<PersistError> for NamedTempFile {
+ #[inline]
+ fn from(error: PersistError) -> NamedTempFile {
+ error.file
+ }
... | 1 | 7 | 0 |
1eb81de7d5a1f1ef89820292fbed7b86ec9c43fe | Steven Allen | 2015-11-30T15:42:31 | Use libc O_CLOEXEC | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 616d3ca..c510360 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -1,4 +1,4 @@
-use ::libc::{self, c_int, O_EXCL, O_RDWR, O_CREAT};
+use ::libc::{self, c_int, O_EXCL, O_RDWR, O_CREAT, O_CLOEXEC};
use ::libc::stat as stat_t;
use std::os::unix::ffi::OsStrExt;
u... | 1 | 1 | 3 |
421957707897d77f5c293e0045a12d3a656befee | Steven Allen | 2015-11-21T03:14:19 | bump to 1.1.3 | diff --git a/Cargo.toml b/Cargo.toml
index a446a89..43498b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "1.1.2"
+version = "1.1.3"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
e7e800a9a3e7ccc966d81158c78b33ac27babbf7 | Steven Allen | 2015-11-21T01:10:25 | Cast to *const libc::c_char.
Because libc >= 2.0 and std <= 1.5 disagree. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index b4189a4..616d3ca 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -19,7 +19,11 @@ pub fn cstr(path: &Path) -> io::Result<CString> {
pub fn create_named(path: &Path) -> io::Result<File> {
match unsafe {
- libc::open(try!(cstr(&path)).as_ptr(), O_CL... | 1 | 15 | 3 |
2f1e93b4965d93f9147fccccef99658cd48c61a7 | Steven Allen | 2015-11-08T14:58:36 | bump to 1.1.2 | diff --git a/Cargo.toml b/Cargo.toml
index c8fe632..a446a89 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "1.1.1"
+version = "1.1.2"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
2e1b3d777ed131cee4617ced3566486c7573f7bf | Steven Allen | 2015-11-08T14:57:44 | Update kernel32 dep | diff --git a/Cargo.toml b/Cargo.toml
index b24a704..c8fe632 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,4 +13,4 @@ license = "MIT/Apache-2.0"
libc = "0.2"
rand = "0.3"
winapi = "0.2"
-kernel32-sys = "0.1"
+kernel32-sys = "0.2" | 1 | 1 | 1 |
5f896d2a08d0fd95d0c086ef2b0b9d8a632065a5 | Matt Brubeck | 2015-11-04T00:34:20 | Upgrade to libc 0.2 | diff --git a/Cargo.toml b/Cargo.toml
index 0a23393..b24a704 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ keywords = ["tempfile", "tmpfile"]
license = "MIT/Apache-2.0"
[dependencies]
-libc = "0.1"
+libc = "0.2"
rand = "0.3"
winapi = "0.2"
kernel32-sys = "0.1"
diff --git a/src/imp/unix.rs b/src/imp/u... | 2 | 2 | 2 |
59073869d4b18f6bd4fa0211fa56cf908ea381a6 | Steven Allen | 2015-09-06T17:23:11 | Don't assume clippy | diff --git a/src/unnamed.rs b/src/unnamed.rs
index 157753d..de26b2b 100644
--- a/src/unnamed.rs
+++ b/src/unnamed.rs
@@ -38,7 +38,6 @@ impl fmt::Debug for TempFile {
}
-#[allow(len_without_is_empty)]
impl TempFile {
/// Create a new temporary file.
pub fn new() -> io::Result<TempFile> { | 1 | 0 | 1 |
ef06166be163d2d9900490b889e83a9ea5d09f34 | Steven Allen | 2015-09-06T16:19:34 | make clippy happy | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 1f67575..5933c99 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -18,7 +18,7 @@ pub fn cstr(path: &Path) -> io::Result<CString> {
}
pub fn create_named(path: &Path) -> io::Result<File> {
- return match unsafe {
+ match unsafe {
libc::open(try... | 2 | 4 | 3 |
b9de74d4e5337ae1af82f7552410854305b875af | Steven Allen | 2015-09-03T19:40:21 | Don't be inline happy | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 81d9e5c..1f67575 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -11,7 +11,6 @@ use ::util::tmpname;
pub const O_CLOEXEC: libc::c_int = 0o2000000;
// Stolen from std.
-#[inline]
pub fn cstr(path: &Path) -> io::Result<CString> {
// TODO: Use OsStr::to_... | 3 | 3 | 28 |
8b7a0de65ef0c5975d8536b46a861ee05634aec3 | Steven Allen | 2015-08-15T22:06:27 | bump to 1.1.0 | diff --git a/Cargo.toml b/Cargo.toml
index 80851e4..0a23393 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "1.1.0"
+version = "1.1.1"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files."
diff --git a/src/directory.rs b/... | 3 | 64 | 1 |
1925e16697afa08dda3e696186424a4453710dd3 | Peter Atashian | 2015-08-15T16:55:08 | Bump winapi dependency
Signed-off-by: Peter Atashian <retep998@gmail.com> | diff --git a/Cargo.toml b/Cargo.toml
index 317936e..80851e4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,5 +12,5 @@ license = "MIT/Apache-2.0"
[dependencies]
libc = "0.1"
rand = "0.3"
-winapi = "0.1"
+winapi = "0.2"
kernel32-sys = "0.1" | 1 | 1 | 1 |
a465306b483efe648016f556d0b134cd059947d1 | Steven Allen | 2015-07-10T15:14:59 | Bump to 1.1.0 | diff --git a/Cargo.toml b/Cargo.toml
index 8bb76c2..317936e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "1.0.0"
+version = "1.1.0"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
5c5cfc5c8fce8c9ae1ce2a460dc6a2df2079f137 | Steven Allen | 2015-07-10T15:09:26 | Implement Deref for NamedTempFile
TempFiles aren't necessarily real files but NamedTempFiles are. | diff --git a/src/named.rs b/src/named.rs
index f1df71d..c7af48c 100644
--- a/src/named.rs
+++ b/src/named.rs
@@ -2,6 +2,7 @@
use std::io::{self, Read, Write, Seek, SeekFrom};
use std::fs::{self, File};
use std::path::{Path, PathBuf};
+use std::ops::{Deref, DerefMut};
use std::error;
use std::fmt;
use std::env;
@@... | 1 | 22 | 18 |
d4f15885f72737fb9aa905e35a1793c0b92b326e | Steven Allen | 2015-06-29T12:27:17 | Bump to 1.0
I haven't changed the API in a while and I doubt I will (ever). | diff --git a/Cargo.toml b/Cargo.toml
index 0185a40..8bb76c2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.5.1"
+version = "1.0.0"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files."
@@ -10,7 +10,7 @@ keywords = ["t... | 1 | 3 | 3 |
0083e29e8e96ab7f6536b01b441f2bdd80f9aaf3 | Peter Atashian | 2015-06-16T00:50:46 | Improve winapi usage
Signed-off-by: Peter Atashian <retep998@gmail.com> | diff --git a/Cargo.toml b/Cargo.toml
index a16cc3d..0185a40 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,10 +12,5 @@ license = "MIT/Apache-2.0"
[dependencies]
libc = "*"
rand = "*"
-
-[target.x86_64-pc-windows-gnu.dependencies]
-winapi = "*"
-kernel32-sys = "*"
-
-[target.i686-pc-windows-gnu.dependencies]
-kernel... | 2 | 5 | 19 |
9317cc1197752e682247a79416913482772e6162 | Steven Allen | 2015-05-23T00:09:51 | Wrap long lines. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index d7ba98d..81d9e5c 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -59,7 +59,8 @@ fn create_unix(dir: &Path) -> io::Result<File> {
Err(e) => Err(e),
}
}
- Err(io::Error::new(io::ErrorKind::AlreadyExists, "too many temporary directori... | 4 | 9 | 5 |
0dec12dd4949ef76cb5675b1f8c56b81f6464588 | Steven Allen | 2015-05-22T15:18:29 | Bump to 0.5.1 | diff --git a/Cargo.toml b/Cargo.toml
index 665f797..a16cc3d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.5.0"
+version = "0.5.1"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
5622df83e14908d7c1cb893fb5310f6a4fd8c23a | Steven Allen | 2015-05-22T15:17:50 | Fix typo. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 780d0c4..d7ba98d 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -42,7 +42,7 @@ pub fn create(dir: &Path) -> io::Result<File> {
#[inline(always)]
#[cfg(not(target_os = "linux"))]
pub fn create(dir: &Path) -> io::Result<File> {
- create_unix(path)
+ cre... | 1 | 1 | 1 |
637c8e9ecb207e033414941e8e3bed2841912511 | Steven Allen | 2015-05-22T00:40:38 | Implement debug for unnamed tempfiles.
Use handle/file descriptor to identify. | diff --git a/src/unnamed.rs b/src/unnamed.rs
index 3f4bfde..2bf5b4f 100644
--- a/src/unnamed.rs
+++ b/src/unnamed.rs
@@ -1,5 +1,6 @@
use std::io::{self, Read, Write, Seek, SeekFrom};
use std::fs::File;
+use std::fmt;
use std::path::Path;
use std::env;
use std;
@@ -22,6 +23,23 @@ use super::imp;
/// from the files... | 1 | 18 | 0 |
e31d00beae79b3da4ffad19c5de7627f3c8d1d74 | Steven Allen | 2015-05-22T00:32:02 | Bump to version 0.5 | diff --git a/Cargo.toml b/Cargo.toml
index 48c46e4..665f797 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.4.0"
+version = "0.5.0"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
3b66295d18f356161991a61c3611983c0f1974af | Steven Allen | 2015-05-22T00:21:48 | Reset file attributes on persist (windows).
closes #2
closes #3 | diff --git a/Cargo.toml b/Cargo.toml
index a62b401..48c46e4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,3 +12,10 @@ license = "MIT/Apache-2.0"
[dependencies]
libc = "*"
rand = "*"
+
+[target.x86_64-pc-windows-gnu.dependencies]
+winapi = "*"
+kernel32-sys = "*"
+
+[target.i686-pc-windows-gnu.dependencies]
+kernel... | 5 | 56 | 19 |
858fe574601709a564f5c33def2f90be8cbd4736 | Steven Allen | 2015-05-21T18:57:51 | Bump to 0.4.0 | diff --git a/Cargo.toml b/Cargo.toml
index 55519fb..a62b401 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.3.0"
+version = "0.4.0"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
cda2e8b5ae6db83dfecb3759ace4d4dafbb7368e | Steven Allen | 2015-05-21T18:56:24 | Make compatible with beta on windows.
Also, don't use "/proc" on linux. This may not be accessible and just
re-opening the file by path and then stating should be enough from a
security standpoint. | diff --git a/src/imp/linux.rs b/src/imp/linux.rs
deleted file mode 100644
index 249342a..0000000
--- a/src/imp/linux.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-use ::libc::{self, c_int, O_EXCL, O_RDWR};
-use std::io;
-use std::os::unix::io::{AsRawFd, FromRawFd};
-use std::fs::{File, OpenOptions};
-use std::path::Path;
-use ::u... | 7 | 102 | 110 |
db6c9a3dc2330b3991150c2f7d53d0316ebc18d1 | Steven Allen | 2015-05-20T00:36:00 | Make tests beta compatible. | diff --git a/tests/namedtempfile.rs b/tests/namedtempfile.rs
index 31dc250..4ca26a8 100644
--- a/tests/namedtempfile.rs
+++ b/tests/namedtempfile.rs
@@ -1,9 +1,14 @@
-#![feature(path_ext)]
extern crate tempfile;
use tempfile::NamedTempFile;
use std::env;
use std::io::{Write, Read, Seek, SeekFrom};
-use std::fs::{Pa... | 1 | 11 | 6 |
b1be160c2ab509de89cc11881102e81f28b13f5a | Steven Allen | 2015-05-17T21:33:39 | Bump to 0.3.0 | diff --git a/Cargo.toml b/Cargo.toml
index 8b04bb0..55519fb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.2.0"
+version = "0.3.0"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
798826e7f81beb38403119d3c7427c2dd42b06a3 | Steven Allen | 2015-05-17T20:38:45 | Reduce DOS chance. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index e7ba065..4912711 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -33,7 +33,7 @@ pub fn create_shared(dir: &Path, count: usize) -> io::Result<Vec<File>> {
if count == 0 {
return Ok(vec![]);
}
- 'outer: loop {
+ 'outer: for _ in 0..::NUM_... | 6 | 12 | 5 |
eb523e3fb0c52aee2e6b72b4622a4a5736ff2ff3 | Steven Allen | 2015-05-17T20:27:04 | Get rid of `TempFile::reopen`
It's impossible to implement this on MacOS/FreeBsd so we might as well
not have it at all. If you need this feature, use `TempFile::shared(count)`. | diff --git a/src/unnamed.rs b/src/unnamed.rs
index e5d3c17..3f4bfde 100644
--- a/src/unnamed.rs
+++ b/src/unnamed.rs
@@ -67,21 +67,6 @@ impl TempFile {
pub fn set_len(&self, size: u64) -> io::Result<()> {
self.0.set_len(size)
}
-
- /// Re-open the temporary file. The returned TempFile will refer t... | 2 | 0 | 26 |
b3eb5e6a6a4d0b11b5f2d1a86283f28178de13ed | Steven Allen | 2015-05-17T20:16:32 | Verbose security warnings. | diff --git a/src/named.rs b/src/named.rs
index 03e95f3..8f50ae0 100644
--- a/src/named.rs
+++ b/src/named.rs
@@ -78,6 +78,25 @@ impl NamedTempFile {
}
/// Create a new temporary file.
+ ///
+ /// *SECURITY WARNING:* This will create a temporary file in the default temporary file
+ /// directory (pl... | 1 | 27 | 0 |
90304b2907a64bebf4da0b4056846c1b8df1b2de | Steven Allen | 2015-05-17T18:08:44 | Remove into_path
If you want to talk about your temporary file, just use `path()`. If you
want to persist it, call `presist(path)`. | diff --git a/src/named.rs b/src/named.rs
index 20c877d..03e95f3 100644
--- a/src/named.rs
+++ b/src/named.rs
@@ -124,14 +124,6 @@ impl NamedTempFile {
fs::remove_file(path)
}
- /// Extract the path to the temporary file. Calling this will prevent the temporary file from
- /// being automatically d... | 2 | 0 | 17 |
bf41e73fb42fb7eec3b78e751334b64912e21125 | Steven Allen | 2015-05-17T16:59:30 | Reorganize. | diff --git a/src/lib.rs b/src/lib.rs
index 9ad2a59..07c964c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -25,320 +25,10 @@
extern crate libc;
extern crate rand;
-use std::io::{self, Read, Write, Seek, SeekFrom};
-use std::fs::{self, File};
-use std::path::{Path, PathBuf};
-use std::error;
-use std::fmt;
-use std::en... | 3 | 330 | 314 |
933d354d1351897db0fa75c4180b8c82d27ca777 | Steven Allen | 2015-05-17T13:46:28 | Get rid of convert feature. | diff --git a/src/lib.rs b/src/lib.rs
index 3ce1521..9ad2a59 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,3 @@
-#![feature(convert)]
#![cfg_attr(windows, feature(fs_ext))]
//! Securely create and manage temporary files. Temporary files created by this create are
//! automatically deleted.
diff --git a/src/util... | 2 | 8 | 6 |
3b3915608b8e99d4a9e203274196f964d83abbf5 | Steven Allen | 2015-05-09T13:56:45 | Remove from_raw_os feature
Still need convert feature. Could probably do without if necessary. | diff --git a/src/lib.rs b/src/lib.rs
index c7843a5..3ce1521 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-#![feature(convert, from_raw_os)]
+#![feature(convert)]
#![cfg_attr(windows, feature(fs_ext))]
//! Securely create and manage temporary files. Temporary files created by this create are
//! automatic... | 1 | 1 | 1 |
12f73fd15002e92eeb5c610ac5d43f9fa2d72f5f | Steven Allen | 2015-05-01T01:50:56 | Document persist error. | diff --git a/src/lib.rs b/src/lib.rs
index 7f4df0b..73c76eb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -157,9 +157,12 @@ impl fmt::Debug for NamedTempFile {
}
}
+/// Error returned when persisting a temporary file fails
#[derive(Debug)]
pub struct PersistError {
+ /// The underlying IO error.
pub err... | 1 | 3 | 0 |
d32d6a5248f4b21f77e5da2dd17a8eb7db4a0cf9 | Steven Allen | 2015-04-29T16:12:29 | Bump to 0.2.0 | diff --git a/Cargo.toml b/Cargo.toml
index dd025ae..8b04bb0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.1.0"
+version = "0.2.0"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
3f0993190645d68dbd6425b725b0393bc29a8c24 | Steven Allen | 2015-04-29T16:08:37 | Expose metadata on NamedTempFile
We only expose len on TempFile because it doesn't really even exist in
the filesystem but there's no reason to keep this restriction on
NamedTempFile. | diff --git a/src/lib.rs b/src/lib.rs
index 7d5de85..7f4df0b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -189,6 +189,16 @@ impl error::Error for PersistError {
}
impl NamedTempFile {
+ #[inline]
+ fn inner(&self) -> &NamedTempFileInner {
+ self.0.as_ref().unwrap()
+ }
+
+ #[inline]
+ fn inner_m... | 1 | 22 | 12 |
ae0cc0e9716449b76a0bce0e5f5935f0a4015fed | Steven Allen | 2015-04-25T18:58:04 | Note that temporary files cannot be persisted across filesystem boundries. | diff --git a/src/lib.rs b/src/lib.rs
index d0ee818..7d5de85 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -248,6 +248,8 @@ impl NamedTempFile {
///
/// If a file exists at the target path, persist will atomically replace it. If this method
/// fails, it will return `self` in the resulting PersistError.
+ ... | 1 | 2 | 0 |
64d185a66ab1045f98820f7d524d7b148912af6b | Steven Allen | 2015-04-23T20:11:01 | Bump to 0.1.0 | diff --git a/Cargo.toml b/Cargo.toml
index 209d6eb..dd025ae 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.0.3"
+version = "0.1.0"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
510749757a061b8648e7db534730016739a3ff36 | Steven Allen | 2015-04-23T20:09:55 | Get rid of collections feature.
The system calls should dominate any extra allocations. | diff --git a/src/lib.rs b/src/lib.rs
index 9f42c8b..d0ee818 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-#![feature(convert, from_raw_os, collections)]
+#![feature(convert, from_raw_os)]
#![cfg_attr(windows, feature(fs_ext))]
//! Securely create and manage temporary files. Temporary files created by this... | 1 | 4 | 2 |
4060c7e67ae886744b531bf8f657f6037e91553e | Steven Allen | 2015-04-23T20:03:34 | Fix inlining
Only inline(always) when delegating directly. | diff --git a/src/lib.rs b/src/lib.rs
index b72e7ee..9f42c8b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,13 +33,13 @@ pub struct TempFile(File);
impl TempFile {
/// Create a new temporary file.
- #[inline(always)]
+ #[inline]
pub fn new() -> io::Result<TempFile> {
Self::new_in(&env::temp_... | 1 | 26 | 20 |
e9f60dc329671720d66d103de661a69d7285913b | Steven Allen | 2015-04-23T19:59:46 | Note that reopen is unstable. | diff --git a/src/lib.rs b/src/lib.rs
index 68907e9..b72e7ee 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -82,6 +82,8 @@ impl TempFile {
/// impossible to reliably implement this method on those operating systems.
///
/// If you need your code to be cross-platform, please use `shared`/`shared_in` defined a... | 1 | 2 | 0 |
5376de1dde5e295e92971fe522700eeb4bf50611 | Steven Allen | 2015-04-23T01:42:22 | Add ability to persist named temporary files. | diff --git a/src/lib.rs b/src/lib.rs
index 1e6d740..68907e9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,6 +8,8 @@ extern crate rand;
use std::io::{self, Read, Write, Seek, SeekFrom};
use std::fs::{self, File};
use std::path::{Path, PathBuf};
+use std::error;
+use std::fmt;
use std::env;
mod imp;
@@ -144,6 +14... | 2 | 77 | 1 |
02c66ff1edf32e8bd0898322d9d5d06508358848 | Steven Allen | 2015-04-16T00:26:25 | Add named variant. | diff --git a/Cargo.toml b/Cargo.toml
index 439cf4e..209d6eb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.0.2"
+version = "0.0.3"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
2c1d5149a9641176ed73b65a11a0a13e37e2c312 | Steven Allen | 2015-04-15T23:58:38 | Add support for named temporary files. | diff --git a/src/imp/linux.rs b/src/imp/linux.rs
index 7857f70..249342a 100644
--- a/src/imp/linux.rs
+++ b/src/imp/linux.rs
@@ -6,6 +6,7 @@ use std::path::Path;
use ::util::cstr;
use super::unix_common::O_CLOEXEC;
use super::unix_common::create as create_unix;
+pub use super::unix_common::create_named;
const O_T... | 7 | 203 | 31 |
6c3276b4736e680308eae95f8a0fa75ef2aca445 | Steven Allen | 2015-04-16T00:16:48 | Fix warnings on unix. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index edeb38b..5f4e57b 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -1,10 +1,9 @@
-use ::libc::{self, c_int, O_EXCL, O_RDWR, O_CREAT};
+use ::libc::{self, O_EXCL, O_RDWR, O_CREAT};
use ::libc::types::os::arch::posix01::stat as stat_t;
use std::io;
-use std::os::... | 1 | 3 | 4 |
6f11a48474bb31aa9d383057723c7d0b0182bac2 | Steven Allen | 2015-04-16T00:15:58 | Actually check that the re-opened files are the same on unix. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 05b16ed..edeb38b 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -53,8 +53,8 @@ pub fn create_shared(dir: &Path, count: usize) -> io::Result<Vec<File>> {
let target_meta = try!(stat(fd));
let mut files: Vec<File> = try!((1..c... | 1 | 2 | 2 |
06c687e1a04eede37094d8b18dde60e8641e07e0 | Steven Allen | 2015-04-15T13:42:31 | Explain removal. | diff --git a/src/lib.rs b/src/lib.rs
index 06178c6..25f1b1f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,9 +1,14 @@
#![feature(convert, from_raw_os, collections)]
#![cfg_attr(windows, feature(fs_ext))]
//! Securely create and manage temporary files. Temporary files created by this create are
-//! automatically del... | 1 | 7 | 2 |
16c240c70f792e35430bf67d2e9ad81bc74058bc | Steven Allen | 2015-04-15T13:33:35 | Spelling. | diff --git a/src/lib.rs b/src/lib.rs
index b8c06a1..06178c6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -34,7 +34,7 @@ impl TempFile {
/// references to the same file.
///
/// This can be useful if you want multiple seek positions in the same temporary file.
- /// Additionally, this function guarentee... | 1 | 2 | 2 |
66fb84f64fb3ffea70ad29ccc7813c6c9daecec5 | Steven Allen | 2015-04-15T00:22:01 | Bump to 0.0.2 | diff --git a/Cargo.toml b/Cargo.toml
index 8dc2a48..439cf4e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tempfile"
-version = "0.0.1"
+version = "0.0.2"
authors = ["Steven Allen <steven@stebalien.com>"]
description = "Securely create temporary files." | 1 | 1 | 1 |
afdc1073a26a1b3555651da811916cc7aa702ea3 | Steven Allen | 2015-04-15T00:21:33 | annotate cstr. | diff --git a/src/util.rs b/src/util.rs
index 2b2cfa9..aa9105b 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -21,6 +21,8 @@ pub fn tmpname() -> OsString {
}
// Stolen from std.
+#[allow(dead_code)] // Not used on windows.
+#[inline(always)]
pub fn cstr(path: &Path) -> io::Result<CString> {
path.as_os_str().to_... | 1 | 2 | 0 |
30f9b2e10a774752d6284491312d564b3a5a3ff6 | Steven Allen | 2015-04-14T18:19:27 | Update cargo metadata | diff --git a/Cargo.toml b/Cargo.toml
index 3a35801..8dc2a48 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,12 @@
name = "tempfile"
version = "0.0.1"
authors = ["Steven Allen <steven@stebalien.com>"]
+description = "Securely create temporary files."
+
+documentation = "https://stebalien.github.io/tempfile/tempfi... | 1 | 6 | 0 |
13a15f598c4609781cabf1f89f1a1fd7b23759c2 | Steven Allen | 2015-04-14T18:06:18 | Add a shared open compatable with osx. | diff --git a/src/imp/linux.rs b/src/imp/linux.rs
new file mode 100644
index 0000000..7857f70
--- /dev/null
+++ b/src/imp/linux.rs
@@ -0,0 +1,33 @@
+use ::libc::{self, c_int, O_EXCL, O_RDWR};
+use std::io;
+use std::os::unix::io::{AsRawFd, FromRawFd};
+use std::fs::{File, OpenOptions};
+use std::path::Path;
+use ::util:... | 8 | 185 | 53 |
f471b5a377110429a6f03013d6f4d5e2e97eb776 | Steven Allen | 2015-04-14T04:39:52 | Finish share docs. | diff --git a/src/lib.rs b/src/lib.rs
index ef342c0..fc06275 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -42,7 +42,8 @@ impl TempFile {
self.0.set_len(size)
}
- /// Create a new temporary file that references
+ /// Re-open the temporary file. The returned TempFile will refer to the same underlying... | 1 | 2 | 1 |
fec426281990bdfa9d1183e8119637a056a4ce79 | Steven Allen | 2015-04-14T04:32:51 | Fix windows. | diff --git a/src/imp/windows.rs b/src/imp/windows.rs
index 845675a..6844e3d 100644
--- a/src/imp/windows.rs
+++ b/src/imp/windows.rs
@@ -1,5 +1,5 @@
use std::os::windows::fs::OpenOptionsExt;
-use std::os::windows::io::{FromRawHandle, AsRawHandle};
+use std::os::windows::io::{FromRawHandle, AsRawHandle, RawHandle};
us... | 2 | 18 | 12 |
a4c7a796c2668d6736f4cb1b2cb04d07cd525c2e | Steven Allen | 2015-04-14T04:32:36 | Don't assume unix in tests. | diff --git a/tests/test.rs b/tests/test.rs
index dada7a9..e5b1b7d 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -4,7 +4,7 @@ use std::io::{Write, Read, Seek, SeekFrom};
#[test]
fn test_basic() {
- let mut tmpfile = TempFile::new_in("/tmp").unwrap();
+ let mut tmpfile = TempFile::new().unwrap();
write... | 1 | 2 | 2 |
70b25ce31b55381583c1a1673c2391904b09109b | Steven Allen | 2015-04-14T04:31:44 | Fix tmpname function. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index f37ea01..7c5ddca 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -2,9 +2,8 @@ use ::libc::{self, c_int, O_EXCL, O_RDWR, O_CREAT};
use std::io;
use std::os::unix::io::{AsRawFd, FromRawFd};
use std::fs::{self, File, OpenOptions};
-use std::os::unix::ffi::OsStr... | 2 | 9 | 10 |
03a70c0f19b2d6c8cda665ab08c450e2e62a014e | Steven Allen | 2015-04-14T03:01:11 | Add windows api call (temporary) | diff --git a/src/imp/windows.rs b/src/imp/windows.rs
index ec5c3ff..845675a 100644
--- a/src/imp/windows.rs
+++ b/src/imp/windows.rs
@@ -3,7 +3,7 @@ use std::os::windows::io::{FromRawHandle, AsRawHandle};
use std::path::Path;
use std::io;
use std::fs::{File, OpenOptions};
-use ::libc::{self, DWORD};
+use ::libc::{se... | 1 | 9 | 1 |
371defa99ca67e4d7f6a4319935e7036f3b19319 | Steven Allen | 2015-04-14T02:58:16 | Fix constants | diff --git a/src/imp/windows.rs b/src/imp/windows.rs
index 9fabb62..ec5c3ff 100644
--- a/src/imp/windows.rs
+++ b/src/imp/windows.rs
@@ -18,9 +18,9 @@ const FLAGS: DWORD = libc::FILE_ATTRIBUTE_HIDDEN
pub fn create(dir: &Path) -> io::Result<File> {
let opts = OpenOptions::new()
.desired_access(ACCESS... | 1 | 2 | 2 |
f154d8a9962a3fcccb91681dedce7d4f7f4620c1 | Steven Allen | 2015-04-14T02:57:56 | Fix windows imports | diff --git a/src/imp/windows.rs b/src/imp/windows.rs
index fb60113..9fabb62 100644
--- a/src/imp/windows.rs
+++ b/src/imp/windows.rs
@@ -1,5 +1,9 @@
use std::os::windows::fs::OpenOptionsExt;
-use libc::DWORD;
+use std::os::windows::io::{FromRawHandle, AsRawHandle};
+use std::path::Path;
+use std::io;
+use std::fs::{Fi... | 1 | 5 | 1 |
38854896c187fdf5eeeefb372b594f867d3725ae | Steven Allen | 2015-04-14T02:28:22 | fix windows mod decl. | diff --git a/src/imp/mod.rs b/src/imp/mod.rs
index b912fa8..e0f94ec 100644
--- a/src/imp/mod.rs
+++ b/src/imp/mod.rs
@@ -5,7 +5,7 @@ mod unix;
pub use self::unix::*;
#[cfg(windows)]
-mod unix;
+mod windows;
#[cfg(windows)]
pub use self::windows::*; | 1 | 1 | 1 |
64920c41983b6de354ff08f032f04e995e305f39 | Steven Allen | 2015-04-13T14:00:15 | Fix unix impl. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index e51bb60..f37ea01 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -8,6 +8,7 @@ use std::ffi::{OsStr, CString};
use ::util::tmpname;
const O_CLOEXEC: libc::c_int = 0o2000000;
+#[cfg(target_os = "linux")]
const O_TMPFILE: libc::c_int = 0o20200000;
// Stole... | 1 | 3 | 2 |
c740a2059a7ad535362f9ad8c922b8a31130fda2 | Steven Allen | 2015-04-13T13:58:05 | Split tests. | diff --git a/tests/test.rs b/tests/test.rs
index 6a88c44..dada7a9 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1,9 +1,19 @@
extern crate tempfile;
use tempfile::TempFile;
-use std::io::{Write, Read};
+use std::io::{Write, Read, Seek, SeekFrom};
#[test]
-fn test() {
+fn test_basic() {
+ let mut tmpfile = T... | 1 | 12 | 2 |
b6f0f3d5b44609ef852fdeacada2989dac80fba9 | Steven Allen | 2015-04-12T20:21:03 | Add cloexec flag. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index a979512..e51bb60 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -7,6 +7,9 @@ use std::path::Path;
use std::ffi::{OsStr, CString};
use ::util::tmpname;
+const O_CLOEXEC: libc::c_int = 0o2000000;
+const O_TMPFILE: libc::c_int = 0o20200000;
+
// Stolen from ... | 1 | 4 | 1 |
cff8e154a76820049cfd6a51dab02c8c2a91826b | Steven Allen | 2015-04-12T20:11:51 | Set close on exec. | diff --git a/src/imp/unix.rs b/src/imp/unix.rs
index 920ef7d..a979512 100644
--- a/src/imp/unix.rs
+++ b/src/imp/unix.rs
@@ -18,7 +18,7 @@ fn create_unix(dir: &Path) -> io::Result<File> {
let name = tmpname();
let tmp_path = dir.join(OsStr::from_bytes(&name));
return match unsafe {
- ... | 1 | 2 | 2 |
ac8ffdfebf65106a1a36352b6cfb7650725976c6 | Steven Allen | 2015-04-12T20:07:47 | Remove shared/shared_in methods.
macos doesn't have openat so I can't do this securely/reliably in the
presence of temporary file cleaners... | diff --git a/src/lib.rs b/src/lib.rs
index 42ba764..20dc29d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -29,29 +29,12 @@ impl TempFile {
imp::create(dir.as_ref()).map(|f| TempFile(f))
}
- /*
- /// Create a new temporary file and return a vector of open files pointing to this file
- /// descript... | 1 | 1 | 18 |
ca35e29beb18a5830ae859ccda37d464565c127d | Steven Allen | 2015-04-12T20:06:49 | Fix import. | diff --git a/src/imp/windows.rs b/src/imp/windows.rs
index 8ed6769..fb60113 100644
--- a/src/imp/windows.rs
+++ b/src/imp/windows.rs
@@ -1,6 +1,6 @@
use std::os::windows::fs::OpenOptionsExt;
use libc::DWORD;
-use ::util::tmpnam;
+use ::util::tmpname;
const ACCESS: DWORD = libc::FILE_GENERIC_READ
... | 1 | 1 | 1 |
26bf4b064bba511d11c54c32b0298b7cfef209ce | aumetra | 2024-03-05T23:21:10 | Remove `fake` dependency | diff --git a/Cargo.toml b/Cargo.toml
index 12ac045..8197697 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,6 +11,3 @@ categories = ["network-programming"]
[dependencies]
rand = "0.8.4"
-
-[dev-dependencies]
-fake = "2.4.1"
diff --git a/src/policies/exponential_backoff.rs b/src/policies/exponential_backoff.rs
index... | 2 | 5 | 6 |
75f1ff6b1a03feb4dc2c95176d0ada885fafaa4d | aumetra | 2024-03-05T23:15:42 | Remove `chrono` dependency | diff --git a/Cargo.toml b/Cargo.toml
index 12dc910..12ac045 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,9 +10,7 @@ keywords = ["retry", "policy", "backoff"]
categories = ["network-programming"]
[dependencies]
-chrono = { version = "0.4.19", features = ["clock"], default-features = false }
rand = "0.8.4"
-anyho... | 3 | 40 | 57 |
f2ecf23e12c20538b1968b566ade53cb4fec66ec | Ethan Brierley | 2023-07-21T15:22:10 | Release version `0.2.0` :rocket: (#13) | diff --git a/Cargo.toml b/Cargo.toml
index b37b31d..a1ba613 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "retry-policies"
-version = "0.1.2"
+version = "0.2.0"
authors = ["Luca Palmieri <lpalmieri@truelayer.com>"]
edition = "2018"
description = "A collection of plug-and-play retry poli... | 1 | 1 | 1 |
c58f3cbbf203c6fa09ee89b6575ea4e2fad41fbf | Alona Enraght-Moony | 2023-05-06T20:51:32 | Fix markdown to make link clickable (#9) | diff --git a/src/policies/exponential_backoff.rs b/src/policies/exponential_backoff.rs
index c28a3c9..69b44dd 100644
--- a/src/policies/exponential_backoff.rs
+++ b/src/policies/exponential_backoff.rs
@@ -7,7 +7,7 @@ const MIN_JITTER: f64 = 0.0;
const MAX_JITTER: f64 = 3.0;
/// We are using the "decorrelated jitter... | 1 | 1 | 1 |
7460b78664e5e04f0d44ceb2e6e5afad028b5120 | Mohammad Mustakim Ali | 2022-10-28T11:11:19 | Derive Debug for RetryDecision (#6)
It is useful to be able to log the RetryDecision. | diff --git a/src/retry_policy.rs b/src/retry_policy.rs
index 5b38af0..2aeb528 100644
--- a/src/retry_policy.rs
+++ b/src/retry_policy.rs
@@ -6,6 +6,7 @@ pub trait RetryPolicy {
}
/// Outcome of evaluating a retry policy for a failed task.
+#[derive(Debug)]
pub enum RetryDecision {
/// Retry after the specifie... | 1 | 1 | 0 |
8bc3640f20a3ba9983b98d08b0a37486737c9208 | Patsakula Nikita | 2026-03-06T15:25:22 | feat(reqwest-middleware): `stream` feature exported. (#246)
Co-authored-by: Jake Oliver <github@skos.ninja> | diff --git a/reqwest-middleware/Cargo.toml b/reqwest-middleware/Cargo.toml
index feef0f3..d2e4f5a 100644
--- a/reqwest-middleware/Cargo.toml
+++ b/reqwest-middleware/Cargo.toml
@@ -18,6 +18,7 @@ http2 = ["reqwest/http2"]
rustls = ["reqwest/rustls"]
query = ["reqwest/query", "dep:serde"]
form = ["reqwest/form", "dep:... | 1 | 1 | 0 |
de315170433461586ae8d99080356c7424dce379 | Miguel Hernández | 2026-03-06T14:02:52 | feat: expose internal reqwest::Client as reference (#209) | diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs
index af82342..b2f4888 100644
--- a/reqwest-middleware/src/client.rs
+++ b/reqwest-middleware/src/client.rs
@@ -246,6 +246,15 @@ impl fmt::Debug for ClientWithMiddleware {
}
}
+// Implementing AsRef<Client> for ClientWithMiddleware... | 1 | 9 | 0 |
7171e650e3b9e906f979b8529061e8659b1b5c32 | Tim Van Wassenhove | 2026-02-04T22:18:07 | fix(reqwest-retry): drop instant by upgrading wasmtimer (#254)
Co-authored-by: Jake Oliver <github@skos.ninja> | diff --git a/reqwest-retry/Cargo.toml b/reqwest-retry/Cargo.toml
index 0e26e6b..7af75e5 100644
--- a/reqwest-retry/Cargo.toml
+++ b/reqwest-retry/Cargo.toml
@@ -30,7 +30,7 @@ hyper = "1.0"
tokio = { version = "1.6.0", default-features = false, features = ["time"] }
[target.'cfg(target_arch = "wasm32")'.dependencies... | 1 | 1 | 1 |
94457404125c5de93c71faed4f27d1f75aef33b5 | Simen Bekkhus | 2025-02-14T16:23:17 | chore: fix clippy warnings | diff --git a/reqwest-retry/tests/all/helpers/simple_server.rs b/reqwest-retry/tests/all/helpers/simple_server.rs
index 672abf1..205aaff 100644
--- a/reqwest-retry/tests/all/helpers/simple_server.rs
+++ b/reqwest-retry/tests/all/helpers/simple_server.rs
@@ -25,7 +25,7 @@ struct Request<'a> {
http_version: &'a str,
... | 2 | 10 | 10 |
ad17f421309d9a0da5dc7fc94b5145452588b4bf | Will_i_code | 2025-02-14T11:34:38 | Move the request_span macro definition out of request_span, such that it takes the crate feature config into account (#212)
Co-authored-by: William Calliari <william.calliari@wuerth-phoenix.net> | diff --git a/reqwest-tracing/src/reqwest_otel_span_macro.rs b/reqwest-tracing/src/reqwest_otel_span_macro.rs
index f35cb0a..c0ed45e 100644
--- a/reqwest-tracing/src/reqwest_otel_span_macro.rs
+++ b/reqwest-tracing/src/reqwest_otel_span_macro.rs
@@ -127,76 +127,24 @@ macro_rules! reqwest_otel_span {
let hea... | 1 | 64 | 60 |
4e856602f64222c797a62b111d1263aa89726b95 | Ethan Brierley | 2024-10-18T13:46:47 | refactor: fix `clippy::single_match` (#194) | diff --git a/reqwest-retry/src/middleware.rs b/reqwest-retry/src/middleware.rs
index f84015e..541e83c 100644
--- a/reqwest-retry/src/middleware.rs
+++ b/reqwest-retry/src/middleware.rs
@@ -158,35 +158,32 @@ where
// We classify the response which will return None if not
// errors were return... | 1 | 24 | 27 |
6d14d78d7ac776571c6bd2175b0cf180939e5e4d | Ethan Brierley | 2024-10-17T08:53:04 | refactor: fix `clippy::needless_borrows_for_generic_args` (#190) | diff --git a/reqwest-retry/tests/all/retry.rs b/reqwest-retry/tests/all/retry.rs
index 902b8a5..15744a9 100644
--- a/reqwest-retry/tests/all/retry.rs
+++ b/reqwest-retry/tests/all/retry.rs
@@ -199,7 +199,7 @@ async fn assert_retry_on_request_timeout() {
.build();
let resp = client
- .get(&format!... | 1 | 4 | 4 |
28a13232c026e217f17c344196f41f7982b64fb7 | Ethan Brierley | 2024-10-17T08:52:55 | docs: fix spelling `clonable` -> `cloneable` (#191) | diff --git a/reqwest-retry/src/middleware.rs b/reqwest-retry/src/middleware.rs
index ccf5b94..f84015e 100644
--- a/reqwest-retry/src/middleware.rs
+++ b/reqwest-retry/src/middleware.rs
@@ -56,14 +56,14 @@ macro_rules! log_retry {
///
/// This middleware always errors when given requests with streaming bodies, before ... | 1 | 4 | 3 |
211a6dea9f09195f4b9e4e89727d9006b547ae15 | Piotr Zaczkowski | 2024-08-25T18:00:04 | Code review suggestions | diff --git a/reqwest-middleware/Cargo.toml b/reqwest-middleware/Cargo.toml
index 0a6c618..e737723 100644
--- a/reqwest-middleware/Cargo.toml
+++ b/reqwest-middleware/Cargo.toml
@@ -15,6 +15,7 @@ multipart = ["reqwest/multipart"]
json = ["reqwest/json"]
charset = ["reqwest/charset"]
http2 = ["reqwest/http2"]
+rustls-... | 2 | 4 | 3 |
d5290d056f2303cfbceaf539b9cb41f97b1bd6f4 | Piotr Zaczkowski | 2024-08-06T20:17:25 | Simplify | diff --git a/reqwest-retry/Cargo.toml b/reqwest-retry/Cargo.toml
index 41f51fd..7fc6e5c 100644
--- a/reqwest-retry/Cargo.toml
+++ b/reqwest-retry/Cargo.toml
@@ -11,7 +11,6 @@ categories = ["web-programming::http-client"]
[features]
default = ["tracing"]
-log = ["dep:log"]
tracing = ["dep:tracing"]
[dependencies... | 2 | 11 | 32 |
d966ad89e53b438483d5606d68e1c8d26504c2f0 | Piotr Zaczkowski | 2024-07-25T10:56:55 | Fix empty and different level naming | diff --git a/reqwest-retry/src/middleware.rs b/reqwest-retry/src/middleware.rs
index 696a5d8..a63764e 100644
--- a/reqwest-retry/src/middleware.rs
+++ b/reqwest-retry/src/middleware.rs
@@ -22,6 +22,7 @@ use ::log as LogTracing;
#[doc(hidden)]
// We need this macro because tracing expects the level to be const:
// ht... | 1 | 12 | 0 |
4ea0e42bcd5e336f37b428106b5aef69069a3b85 | Piotr Zaczkowski | 2024-07-25T09:31:29 | Correct `use` | diff --git a/reqwest-retry/src/middleware.rs b/reqwest-retry/src/middleware.rs
index a1613e4..696a5d8 100644
--- a/reqwest-retry/src/middleware.rs
+++ b/reqwest-retry/src/middleware.rs
@@ -11,8 +11,13 @@ use retry_policies::RetryPolicy;
#[cfg(feature = "tracing")]
type LogLevel = ::tracing::Level;
+#[cfg(feature = ... | 1 | 10 | 5 |
3ddfded9e35e4f0e98edb44defdb3e13c97651fa | Tom Finlayson | 2024-08-22T14:55:22 | fix: restore adding http.url as an attribute when deprecated_attributes feature is enabled | diff --git a/reqwest-tracing/src/reqwest_otel_span_builder.rs b/reqwest-tracing/src/reqwest_otel_span_builder.rs
index 7848389..ae92e04 100644
--- a/reqwest-tracing/src/reqwest_otel_span_builder.rs
+++ b/reqwest-tracing/src/reqwest_otel_span_builder.rs
@@ -165,7 +165,13 @@ pub struct SpanBackendWithUrl;
impl ReqwestOt... | 1 | 7 | 1 |
47f52327e8e48bd7226e603ea970c5e08e023364 | Thomas Nicollet | 2024-08-05T18:47:13 | :sparkles: Added `Default` derive to allow for same functionality as base type (#179) | diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs
index 15145cc..fdf091d 100644
--- a/reqwest-middleware/src/client.rs
+++ b/reqwest-middleware/src/client.rs
@@ -93,7 +93,7 @@ impl ClientBuilder {
/// `ClientWithMiddleware` is a wrapper around [`reqwest::Client`] which runs middleware ... | 1 | 1 | 1 |
053d329e8b4a27bf9e861749e15d7b68217eb7ba | David Mládek | 2024-07-30T08:46:19 | OpenTelemetry 0.24 support (#171)
* feat: support opentelemetry 0.24
* minor fix
* Fix opentelemetry 0.24 by upgrading tracing-opentelemetry to 0.25
---------
Co-authored-by: Aitor Fernandez <aitor.fernandez@truelayer.com>
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com> | diff --git a/reqwest-tracing/Cargo.toml b/reqwest-tracing/Cargo.toml
index 227f097..ae9ff85 100644
--- a/reqwest-tracing/Cargo.toml
+++ b/reqwest-tracing/Cargo.toml
@@ -14,6 +14,7 @@ opentelemetry_0_20 = ["opentelemetry_0_20_pkg", "tracing-opentelemetry_0_21_pkg"
opentelemetry_0_21 = ["opentelemetry_0_21_pkg", "tracin... | 4 | 44 | 0 |
ceeb058502c4743c9e7178383296b264f54753f3 | Ethan Brierley | 2024-07-29T17:59:48 | fix(test): enable `rustls-tls` for tests
This is helpful for [this test](https://github.com/TrueLayer/reqwest-middleware/blob/c90089ebd4cecf7cfb7d84d6664a993983682ce1/reqwest-middleware/src/lib.rs#L8).
This enables tests to pass when running `cargo test --no-default-features`. | diff --git a/reqwest-middleware/Cargo.toml b/reqwest-middleware/Cargo.toml
index b80962c..051aa7c 100644
--- a/reqwest-middleware/Cargo.toml
+++ b/reqwest-middleware/Cargo.toml
@@ -27,6 +27,7 @@ thiserror = "1.0.21"
tower-service = "0.3.0"
[dev-dependencies]
+reqwest = { version = "0.12.0", features = ["rustls-tls"... | 1 | 1 | 0 |
c54a7733b9ef954960bb8d0a78b90a6b297b1ce5 | Ethan Brierley | 2024-07-29T18:26:47 | fix(lint): `clippy::doc_lazy_continuation`
```
error: doc list item missing indentation
Error: --> reqwest-retry/src/middleware.rs:62:4
|
62 | /// `Body`'s `From<String>` or `From<Bytes>` implementations.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for furthe... | diff --git a/reqwest-retry/src/middleware.rs b/reqwest-retry/src/middleware.rs
index cd7cda3..e4f01d1 100644
--- a/reqwest-retry/src/middleware.rs
+++ b/reqwest-retry/src/middleware.rs
@@ -59,10 +59,10 @@ macro_rules! log_retry {
///
/// Some workaround suggestions:
/// * If you can fit the data in memory, you can i... | 1 | 2 | 2 |
33421175a8e1e76b8d6b88a76a0d9b598ecec3e7 | Piotr Zaczkowski | 2024-07-23T10:15:17 | Remove superfluous dependency to chrono (#170) | diff --git a/reqwest-retry/Cargo.toml b/reqwest-retry/Cargo.toml
index 7d6aaa2..9d7f47c 100644
--- a/reqwest-retry/Cargo.toml
+++ b/reqwest-retry/Cargo.toml
@@ -14,7 +14,6 @@ reqwest-middleware = { version = "0.3.0", path = "../reqwest-middleware" }
anyhow = "1.0.0"
async-trait = "0.1.51"
-chrono = { version = "0.4... | 1 | 0 | 1 |
3ae02fcd8bb4cf94396d76a11a69ac9b8e70b7e0 | Chris Beck | 2024-06-01T00:57:43 | add re-exports from retry-policies crate (#157)
fixes #84 | diff --git a/reqwest-retry/src/lib.rs b/reqwest-retry/src/lib.rs
index 7ab0ee0..d33ea1d 100644
--- a/reqwest-retry/src/lib.rs
+++ b/reqwest-retry/src/lib.rs
@@ -29,7 +29,7 @@ mod middleware;
mod retryable;
mod retryable_strategy;
-pub use retry_policies::{policies, RetryPolicy};
+pub use retry_policies::{policies, ... | 1 | 1 | 1 |
fa84b1fd414d13e36479b4b176a96c954024d2e0 | Stefan Adrian Danaita | 2024-05-03T16:31:45 | [BOT-272] Function description update | diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs
index 3fcc71c..15145cc 100644
--- a/reqwest-middleware/src/client.rs
+++ b/reqwest-middleware/src/client.rs
@@ -31,7 +31,7 @@ impl ClientBuilder {
}
}
- /// Convenience method to create a ClientBuilder
+ /// This meth... | 1 | 1 | 1 |
7dc0560d38d0e7744c108f297a148cbc3b4bd265 | Stefan Adrian Danaita | 2024-05-03T16:27:51 | [BOT-272] Change function from ::extend to ::from_client | diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs
index c7939b8..3fcc71c 100644
--- a/reqwest-middleware/src/client.rs
+++ b/reqwest-middleware/src/client.rs
@@ -31,14 +31,14 @@ impl ClientBuilder {
}
}
- /// Convenience method to extend a ClientBuilder instance by appe... | 1 | 8 | 8 |
8d394a964a9aa6c2dbbe20dac650cd32f7195d1e | Stefan Adrian Danaita | 2024-05-03T16:11:10 | [BOT-272] Fmt | diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs
index 2ad8162..c7939b8 100644
--- a/reqwest-middleware/src/client.rs
+++ b/reqwest-middleware/src/client.rs
@@ -34,8 +34,10 @@ impl ClientBuilder {
/// Convenience method to extend a ClientBuilder instance by appending
/// the mi... | 1 | 4 | 2 |
d406eb2ce7662bfc9574662f79f6a894f057e1ae | Stefan Adrian Danaita | 2024-05-03T02:29:33 | [BOT-272] ClientBuilder extend convenience function | diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs
index 4694531..2ad8162 100644
--- a/reqwest-middleware/src/client.rs
+++ b/reqwest-middleware/src/client.rs
@@ -31,6 +31,14 @@ impl ClientBuilder {
}
}
+ /// Convenience method to extend a ClientBuilder instance by appen... | 1 | 8 | 0 |
9ac5f691bfdb7f3b9974a48605647242fd8538ce | Luca Palmieri | 2024-04-26T12:54:35 | Fix logging of `User-Agent` header in `reqwest-tracing` (#148) | diff --git a/reqwest-tracing/src/reqwest_otel_span_macro.rs b/reqwest-tracing/src/reqwest_otel_span_macro.rs
index 3f3d732..b60a7fb 100644
--- a/reqwest-tracing/src/reqwest_otel_span_macro.rs
+++ b/reqwest-tracing/src/reqwest_otel_span_macro.rs
@@ -125,7 +125,7 @@ macro_rules! reqwest_otel_span {
let host_... | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.