File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 1313 up picking the same element twice from a given list.
1414- Improved formatting of JavaScript errors in ` string.inspect ` .
1515- JavaScript circular references can now be printed by ` string.inspect ` .
16+ - The alias ` result.then ` was deprecated in favour of using ` result.try `
17+ directly.
1618
1719## v0.60.0 - 2025-05-13
1820
Original file line number Diff line number Diff line change @@ -165,8 +165,7 @@ pub fn try(
165165 }
166166}
167167
168- /// An alias for `try`. See the documentation for that function for more information.
169- ///
168+ @ deprecated ( "This function is an alias of result.try, use that instead" )
170169pub fn then (
171170 result : Result ( a, e) ,
172171 apply fun : fn ( a) -> Result ( b, e) ,
Original file line number Diff line number Diff line change @@ -48,16 +48,6 @@ pub fn try_test() {
4848 assert result.try(Ok(1), fn(_) { Error(1) }) == Error(1)
4949}
5050
51- pub fn then_test() {
52- assert result.then(Error(1), fn(x) { Ok(x + 1) }) == Error(1)
53-
54- assert result.then(Ok(1), fn(x) { Ok(x + 1) }) == Ok(2)
55-
56- assert result.then(Ok(1), fn(_) { Ok("type change") }) == Ok("type change")
57-
58- assert result.then(Ok(1), fn(_) { Error(1) }) == Error(1)
59- }
60-
6151pub fn unwrap_test() {
6252 assert result.unwrap(Ok(1), 50) == 1
6353
You can’t perform that action at this time.
0 commit comments