summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-07-08 03:21:46 +0000
committerGitHub <noreply@github.com>2021-07-08 03:21:46 +0000
commit865c7488b8d9d0909b03d8312073976ee6514757 (patch)
tree0b547940e2025d7f24a10162c1fbcb0bb785d06b /CHANGELOG.md
parenta2165e629899bfb9ae9b079bd63179ef7983da90 (diff)
parent714d6e94915f7781748bd71ced4c11e6333975ab (diff)
downloadnix-865c7488b8d9d0909b03d8312073976ee6514757.zip
Merge #1446
1446: Overhaul Nix's error types r=asomers a=asomers For many of Nix's consumers it be convenient to easily convert a Nix error into a std::io::Error. That's currently not possible because of the InvalidPath, InvalidUtf8, and UnsupportedOperation types that have no equivalent in std::io::Error. However, very few of Nix's public APIs actually return those unusual errors. So a more useful API would be for Nix's standard error type to implement Into<std::io::Error>, and the few functions that must return unusual errors like InvalidUtf8 should use bespoke error types. This commit prototypes that approach by modifying just one function, for now, to use the new error type. Co-authored-by: Alan Somers <asomers@gmail.com>
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fcc8d4c2..4fe700d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,16 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1457](https://github.com/nix-rust/nix/pull/1457))
### Changed
+- `ptsname_r` now returns a lossily-converted string in the event of bad UTF,
+ just like `ptsname`.
+ ([#1446](https://github.com/nix-rust/nix/pull/1446))
+- Nix's error type is now a simple wrapper around the platform's Errno. This
+ means it is now `Into<std::io::Error>`. It's also `Clone`, `Copy`, `Eq`, and
+ has a small fixed size. It also requires less typing. For example, the old
+ enum variant `nix::Error::Sys(nix::errno::Errno::EINVAL)` is now simply
+ `nix::Error::EINVAL`.
+ ([#1446](https://github.com/nix-rust/nix/pull/1446))
+
### Fixed
### Removed