File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020- template : ci/azure-test-stable.yml
2121 parameters :
2222 name : minrust
23- rust_version : 1.36 .0
23+ rust_version : 1.39 .0
2424 cmd : check
2525
2626# Stable
3737 parameters :
3838 name : nightly
3939 # Pin nightly to avoid being impacted by breakage
40- rust_version : nightly-2019-07-17
40+ rust_version : nightly-2019-09-25
4141 benches : true
4242
4343# Run tests on some extra platforms
Original file line number Diff line number Diff line change @@ -114,6 +114,17 @@ impl Bytes {
114114 /// assert_eq!(&b[..], b"hello");
115115 /// ```
116116 #[ inline]
117+ #[ cfg( not( all( loom, test) ) ) ]
118+ pub const fn from_static ( bytes : & ' static [ u8 ] ) -> Bytes {
119+ Bytes {
120+ ptr : bytes. as_ptr ( ) ,
121+ len : bytes. len ( ) ,
122+ data : AtomicPtr :: new ( ptr:: null_mut ( ) ) ,
123+ vtable : & STATIC_VTABLE ,
124+ }
125+ }
126+
127+ #[ cfg( all( loom, test) ) ]
117128 pub fn from_static ( bytes : & ' static [ u8 ] ) -> Bytes {
118129 Bytes {
119130 ptr : bytes. as_ptr ( ) ,
@@ -732,7 +743,7 @@ impl fmt::Debug for Vtable {
732743
733744// ===== impl StaticVtable =====
734745
735- static STATIC_VTABLE : Vtable = Vtable {
746+ const STATIC_VTABLE : Vtable = Vtable {
736747 clone : static_clone,
737748 drop : static_drop,
738749} ;
You can’t perform that action at this time.
0 commit comments