Skip to content

Commit

Permalink
release: 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Sep 11, 2023
2 parents 0e278a3 + 51bfdb8 commit a12a4dd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Changelog


## [0.4.1](https://github.com/Blobfolio/write_atomic/releases/tag/v0.4.1) - 2023-09-10

### Changed

* Remove unnecessary `BufWriter` wrapper



## [0.4.0](https://github.com/Blobfolio/write_atomic/releases/tag/v0.4.0) - 2023-07-24

### Changed
Expand Down
6 changes: 3 additions & 3 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Project Dependencies
Package: write_atomic
Version: 0.4.0
Generated: 2023-07-25 04:38:55 UTC
Version: 0.4.1
Generated: 2023-09-11 05:44:19 UTC

| Package | Version | Author(s) | License |
| ---- | ---- | ---- | ---- |
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
| [fastrand](https://github.com/smol-rs/fastrand) | 2.0.0 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 or MIT |
| [tempfile](https://github.com/Stebalien/tempfile) | 3.7.0 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | Apache-2.0 or MIT |
| [tempfile](https://github.com/Stebalien/tempfile) | 3.8.0 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | Apache-2.0 or MIT |
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "write_atomic"
version = "0.4.0"
version = "0.4.1"
authors = ["Blobfolio, LLC. <[email protected]>"]
edition = "2021"
rust-version = "1.63"
Expand Down
14 changes: 1 addition & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ That said, one might still enjoy the ergonomic single-shot nature of Write Atomi
// One line is all it takes:
write_atomic::write_file("/path/to/my-file.txt", b"Some data!").unwrap();
```
## Installation
Add `write_atomic` to your `dependencies` in `Cargo.toml`, like:
```text,ignore
[dependencies]
write_atomic = "0.4.*"
```
*/

#![deny(unsafe_code)]
Expand Down Expand Up @@ -62,7 +52,6 @@ write_atomic = "0.4.*"
use std::{
fs::File,
io::{
BufWriter,
Error,
ErrorKind,
Result,
Expand Down Expand Up @@ -130,10 +119,9 @@ pub fn write_file<P>(src: P, data: &[u8]) -> Result<()>
where P: AsRef<Path> {
let (dst, parent) = check_path(src)?;

let mut file = BufWriter::new(tempfile::Builder::new().tempfile_in(parent)?);
let mut file = tempfile::Builder::new().tempfile_in(parent)?;
file.write_all(data)?;
file.flush()?;
let file = file.into_inner()?;

let touched = touch_if(&dst)?;
if let Err(e) = write_finish(file, &dst) {
Expand Down

0 comments on commit a12a4dd

Please sign in to comment.