Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c3c546

Browse files
committed
pub use instead ofpub type re-exporting
This utilizes `#[cfg(doc)]` such that documentation shows it as a typealias, while the code actually compiled in every other situation is are-export, avoiding the limitations of rustc.
1 parent266178d commit3c3c546

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

‎CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,29 @@ The format is based on [Keep a Changelog]. This project adheres to [Semantic Ver
66

77
---
88

9+
##0.3.36[2024-04-10]
10+
11+
#### Fixed
12+
13+
-`FormatItem` can be used as part of an import path. See[#675] for details.
14+
15+
[#675]:https://github.com/time-rs/time/issues/675
16+
917
##0.3.35[2024-04-10]
1018

11-
##Added
19+
###Added
1220

1321
-`Duration::checked_neg`
1422
-`ext::InstantExt`, which provides methods for using`time::Duration` with`std::time::Instant`
1523

16-
##Changed
24+
###Changed
1725

1826
-`Instant` is deprecated. It is recommended to use`std::time::Instant` directly, importing
1927
`time::ext::InstantExt` for interoperability with`time::Duration`.
2028
-`FormatItem` has been renamed to`BorrowedFormatItem`, avoiding confusion with`OwnedFormatItem`.
2129
An alias has been added for backwards compatibility.
2230

23-
##Fixed
31+
###Fixed
2432

2533
- The weekday is optional when parsing RFC2822.
2634
- The range of sub-second values in`Duration` is documented correctly. The previous documentation
@@ -382,6 +390,9 @@ This includes the update to the `format_description!` macro, which was supposed
382390
-[#481]:`Time` subtracted from`Time` can panic. This was caused by a bug that has always existed,
383391
in that an internal invariant was not upheld. Memory safety was not violated.
384392

393+
[#479]:https://github.com/time-rs/time/issues/479
394+
[#481]:https://github.com/time-rs/time/issues/481
395+
385396
##0.3.10[2022-06-19]
386397

387398
###Added

‎Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎time/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name ="time"
3-
version ="0.3.35"
3+
version ="0.3.36"
44
authors = ["Jacob Pratt <open-source@jhpratt.dev>","Time contributors"]
55
edition ="2021"
66
rust-version ="1.67.0"

‎time/src/format_description/borrowed_format_item.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ use core::fmt;
99
///
1010
/// This alias exists for backwards-compatibility. It is recommended to use `BorrowedFormatItem`
1111
/// for clarity, as it is more explicit that the data is borrowed rather than owned.
12+
#[cfg(doc)]
1213
#[deprecated(
1314
since ="0.3.35",
1415
note ="use `BorrowedFormatItem` instead for clarity"
1516
)]
1617
pubtypeFormatItem<'a> =BorrowedFormatItem<'a>;
1718

19+
#[cfg(not(doc))]
20+
pubuseself::BorrowedFormatItemasFormatItem;
1821
usecrate::error;
1922
usecrate::format_description::Component;
2023

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp