File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ serde = ["dep:serde", "uuid?/serde"]
3636utoipa = [" dep:utoipa" ]
3737
3838example-generated = [" typed-uuid" ]
39+ test = [" typed-uuid" ]
3940
4041[lints ]
4142workspace = true
Original file line number Diff line number Diff line change 6464/// ```
6565///
6666/// [^See note]: There is no way in normal usage to construct an instance. The exception is with the
67- /// `new_unchecked` method, which is intended for special cases, such as testing.
67+ /// `new_unchecked` method, which is gated behind the `test` feature and intended for special cases
68+ /// (including testing).
6869#[ macro_export]
6970macro_rules! typed_uuid {
7071 (
@@ -93,6 +94,7 @@ macro_rules! typed_uuid {
9394 impl $name {
9495 /// Creates a new, unchecked typed Uuid
9596 #[ must_use]
97+ #[ cfg( feature = "test" ) ]
9698 pub fn new_unchecked( inner: :: uuid:: Uuid ) -> Self {
9799 Self ( inner)
98100 }
You can’t perform that action at this time.
0 commit comments