David Tolnay
9d944e6a2e
Document no-std support
2019-11-27 21:55:25 -08:00
David Tolnay
60c88bc53c
Expose reduced API in no_std mode
2019-11-27 21:23:37 -08:00
David Tolnay
bacf886a9c
Import from core where possible
...
In preparation for introducing no_std support!
2019-11-27 21:02:34 -08:00
David Tolnay
e48b330f95
Merge pull request #52 from dtolnay/quoted
...
Remove std dependency from context's Debug impl
2019-11-27 21:02:00 -08:00
David Tolnay
2e711d6afa
Remove std dependency from context's Debug impl
...
Replacing the std-only to_string() call in the previous implementation
is required for introducing no_std support.
2019-11-27 20:56:23 -08:00
David Tolnay
4f123aee8b
Remove need for allow(unused_imports)
2019-11-27 20:27:12 -08:00
David Tolnay
9060b6b754
No need to probe backtrace if std is disabled
2019-11-27 16:22:31 -08:00
David Tolnay
e7fd273754
Avoid unused import when building without backtrace
2019-11-27 16:07:45 -08:00
David Tolnay
d175627ab6
Release 1.0.24
2019-11-27 14:55:28 -08:00
David Tolnay
74fbea66c7
Merge pull request #50 from dtolnay/boxed
...
Conversion from Box<dyn StdError + Send + Sync> to Error
2019-11-27 14:54:47 -08:00
David Tolnay
1a7c075a7e
Merge pull request #49 from kolloch/patch-1
...
Rename the probe rust file to probe.rs
2019-11-27 14:52:18 -08:00
David Tolnay
9256781026
Conversion from Box<dyn StdError + Send + Sync> to Error
2019-11-27 14:49:42 -08:00
David Tolnay
ba0b30790c
Move transparent wrapper errors to own module
2019-11-27 14:23:13 -08:00
Peter Kolloch
f8c7340ec7
Rename the probe rust file to probe.rs
...
This would help some people with build problems using [nix](https://nixos.org) or to be more specific `buildRustCrate` (but that's probably not meaningful to you).
See https://github.com/kolloch/crate2nix/issues/39 and https://github.com/NixOS/nixpkgs/issues/74071.
It is clearly a bug in buildRustCrate but if you could accept this change in the meanwhile...
2019-11-24 20:48:14 +01:00
David Tolnay
303e1a08e7
Release 1.0.23
2019-11-22 19:06:55 -08:00
David Tolnay
dc263b4c19
Test derive(Error) in docs using thiserror
2019-11-22 19:06:03 -08:00
David Tolnay
284dec5328
Remove extra trailing newline from debug representation
...
The termination impl for Result inserts a trailing newline automatically:
https://github.com/rust-lang/rust/blob/1.39.0/src/libstd/process.rs#L1640
So if we print one too, there ends up being a needless blank line in the
output.
2019-11-22 18:57:56 -08:00
David Tolnay
9a06ac1ea1
Simplify cause chain printing
...
I find this clearer because each component (the indent, the index, and
the message) is each only printed in one place.
2019-11-22 18:49:29 -08:00
David Tolnay
2d8d0aa02a
Implement Default for Chain to be an empty chain
2019-11-22 18:12:54 -08:00
David Tolnay
ca2b8b9bb0
Add a Chain::new constructor
2019-11-22 18:12:52 -08:00
David Tolnay
2c88164b5b
Add AsRef impls for Error
...
These are potentially friendlier than fiddling with &** to get the trait
object.
let _: &dyn StdError = error.as_ref();
2019-11-22 16:51:41 -08:00
David Tolnay
645a81c135
Remove stack backtrace disabled notice
...
This message ended up being too noisy. Applications that want to print a
notice like this can print it themselves.
2019-11-22 12:07:47 -08:00
David Tolnay
1790576a85
Release 1.0.22
2019-11-18 11:47:01 -08:00
David Tolnay
cb3c80cca7
Merge pull request #47 from dtolnay/anyhow
...
Handle anyhow::Error as argument to anyhow!()
2019-11-18 11:46:34 -08:00
David Tolnay
210e60a8c4
Handle anyhow::Error as argument to anyhow!()
2019-11-18 11:42:12 -08:00
David Tolnay
59fb765bab
Add test for anyhow from anyhow
2019-11-18 11:42:11 -08:00
David Tolnay
6088b60791
Fill in some explanations of unsafe code
...
Closes #14 .
2019-11-17 16:01:08 -08:00
David Tolnay
5ef79ebe3e
Allow Send and Sync autotraits to be inferred
2019-11-17 15:27:01 -08:00
David Tolnay
2bbf85abee
Release 1.0.21
2019-11-17 14:55:25 -08:00
David Tolnay
00545d5c0e
Merge pull request #45 from dtolnay/chain
...
Provide DoubleEndedIterator and ExactSizeIterator for anyhow::Chain
2019-11-17 14:54:17 -08:00
David Tolnay
9ef3d2debe
Add chain iterator test
2019-11-17 14:49:16 -08:00
David Tolnay
7c8064f6a6
Implement ExactSizeIterator for Chain
2019-11-17 14:41:23 -08:00
David Tolnay
a2caba0748
Implement DoubleEndedIterator for Chain
2019-11-17 14:41:23 -08:00
David Tolnay
a8c199b37d
Move Chain implementation to chain.rs
2019-11-17 14:41:23 -08:00
David Tolnay
7246344a3e
Remove unneeded take in Chain implementation
2019-11-17 14:40:56 -08:00
David Tolnay
0dca03d315
Release 1.0.20
2019-11-15 21:36:23 -08:00
David Tolnay
a2b3fbd41a
Line up altdisplay expected strings on one line
...
Rustfmt does not like how these were previously formatted and insisted
on doing:
const EXPECTED_ALTDISPLAY_G: &str = "\
f failed: oh no!\
";
which is worse.
2019-11-15 21:34:44 -08:00
David Tolnay
87e85abfd8
Use instrs.json as file path in examples
...
The jsox file extension was intended to imply that there had been a
typo, but it ended up being distracting.
2019-11-15 21:33:01 -08:00
David Tolnay
437c691d16
Capitalize example error messages
2019-11-15 21:33:01 -08:00
David Tolnay
74954bdbd7
Merge pull request #42 from dtolnay/fmt
...
Add and document {:#} and {:#?} alt format representations
2019-11-15 21:32:53 -08:00
David Tolnay
c30a32bdda
Render alt display on one line with colons
2019-11-15 21:25:40 -08:00
David Tolnay
bba67262ed
Test the alt format representations
2019-11-15 20:59:57 -08:00
David Tolnay
42d02866ee
Document all the display representations
2019-11-15 20:50:30 -08:00
David Tolnay
7da2a83336
Move error formatting to fmt.rs
2019-11-15 20:44:02 -08:00
David Tolnay
b1c7c7afb1
Implement alternate display format {:#}
2019-11-15 20:44:02 -08:00
David Tolnay
cba8b1fb47
Implement alternate debug format {:#?}
2019-11-15 20:44:02 -08:00
David Tolnay
d324d628f3
Add Clone impl for anyhow::Chain
2019-11-15 20:44:02 -08:00
David Tolnay
373930df3d
Update stack backtrace disabled notice
2019-11-15 20:44:02 -08:00
David Tolnay
68897dfeb2
Capitalize stack backtrace heading
2019-11-15 20:44:02 -08:00
David Tolnay
4e2dd07c8d
Remove redundant backtrace trailing newline
2019-11-15 20:44:02 -08:00