Uprev intrusive-collections to 0.9.2

Bug: 190415778
Test: m
Change-Id: I9d677aa378031846509c0168a985fdd8f1162503
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index b1ec331..b9b4b0c 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "dc12677569f654e54bf274ffeefb615095d445c1"
+    "sha1": "2d89ebc111d7c3955dba15faec57ad4dbcd49d26"
   }
 }
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..10c7d3a
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,44 @@
+
+name: CI
+on: [push, pull_request]
+jobs:
+  test:
+    name: Test
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        rust: [1.39.0, stable, beta, nightly]
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v2
+    - name: Install rust
+      uses: actions-rs/toolchain@v1
+      with:
+        toolchain: ${{ matrix.rust }}
+        profile: minimal
+        override: true
+    - uses: actions-rs/cargo@v1
+      with:
+        command: test
+    - if: matrix.rust == 'nightly'
+      uses: actions-rs/cargo@v1
+      with:
+        command: test
+        args: --features nightly
+
+  fmt:
+    name: Rustfmt
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: minimal
+          toolchain: stable
+          override: true
+      - run: rustup component add rustfmt
+      - uses: actions-rs/cargo@v1
+        with:
+          command: fmt
+          args: -- --check
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 93007e1..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-language: rust
-sudo: false
-addons:
-  apt:
-    packages:
-    - libcurl4-openssl-dev
-    - libelf-dev
-    - libdw-dev
-    - binutils-dev
-
-rust:
-- nightly
-- beta
-- stable
-- 1.39.0
-
-before_script:
-- |
-  pip install 'travis-cargo<0.2' --user &&
-  export PATH=$HOME/.local/bin:$PATH
-
-script:
-- travis-cargo build
-- travis-cargo test
-- travis-cargo doc
-
-after_success:
-- travis-cargo --only nightly doc-upload
-- travis-cargo --only nightly coveralls --no-sudo --verify
-
-env:
-  global:
-  - TRAVIS_CARGO_NIGHTLY_FEATURE=nightly
-
-notifications:
-  email: false
diff --git a/Cargo.toml b/Cargo.toml
index 7c2cbdf..1b8f9ee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 [package]
 edition = "2018"
 name = "intrusive-collections"
-version = "0.9.1"
+version = "0.9.2"
 authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
 description = "Intrusive collections for Rust (linked list and red-black tree)"
 documentation = "https://docs.rs/intrusive-collections"
@@ -25,10 +25,10 @@
 [dependencies.memoffset]
 version = "0.5.4"
 [dev-dependencies.rand]
-version = "0.7.3"
+version = "0.8.4"
 
 [dev-dependencies.rand_xorshift]
-version = "0.2.0"
+version = "0.3.0"
 
 [dev-dependencies.typed-arena]
 version = "2.0.1"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 3df8f20..ea5413d 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "intrusive-collections"
-version = "0.9.1"
+version = "0.9.2"
 authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
 description = "Intrusive collections for Rust (linked list and red-black tree)"
 documentation = "https://docs.rs/intrusive-collections"
@@ -20,6 +20,6 @@
 memoffset = "0.5.4"
 
 [dev-dependencies]
-rand = "0.7.3"
+rand = "0.8.4"
 typed-arena = "2.0.1"
-rand_xorshift = "0.2.0"
+rand_xorshift = "0.3.0"
diff --git a/METADATA b/METADATA
index f1f5d9b..3ddaf5c 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/intrusive-collections/intrusive-collections-0.9.1.crate"
+    value: "https://static.crates.io/crates/intrusive-collections/intrusive-collections-0.9.2.crate"
   }
-  version: "0.9.1"
+  version: "0.9.2"
   license_type: NOTICE
   last_upgrade_date {
     year: 2021
-    month: 5
-    day: 19
+    month: 7
+    day: 15
   }
 }
diff --git a/src/adapter.rs b/src/adapter.rs
index 3a146e9..5484a0f 100644
--- a/src/adapter.rs
+++ b/src/adapter.rs
@@ -152,6 +152,7 @@
 /// }
 /// intrusive_adapter!(MyAdapter = Box<Test>: Test { link: LinkedListLink });
 /// intrusive_adapter!(pub MyAdapter2 = Box<Test>: Test { link2: RBTreeLink });
+/// intrusive_adapter!(pub(crate) MyAdapter3 = Box<Test>: Test { link2: RBTreeLink });
 ///
 /// pub struct Test2<T>
 ///     where T: Clone + ?Sized
@@ -159,17 +160,17 @@
 ///     link: LinkedListLink,
 ///     val: T,
 /// }
-/// intrusive_adapter!(MyAdapter3<'a, T> = &'a Test2<T>: Test2<T> { link: LinkedListLink } where T: ?Sized + Clone + 'a);
+/// intrusive_adapter!(MyAdapter4<'a, T> = &'a Test2<T>: Test2<T> { link: LinkedListLink } where T: ?Sized + Clone + 'a);
 /// ```
 #[macro_export]
 macro_rules! intrusive_adapter {
     (@impl
-        $(#[$attr:meta])* ($($privacy:tt)*) $name:ident ($($args:tt),*)
+        $(#[$attr:meta])* $vis:vis $name:ident ($($args:tt),*)
         = $pointer:ty: $value:path { $field:ident: $link:ty } $($where_:tt)*
     ) => {
         #[allow(explicit_outlives_requirements)]
         $(#[$attr])*
-        $($privacy)* struct $name<$($args),*> $($where_)* {
+        $vis struct $name<$($args),*> $($where_)* {
             link_ops: <$link as $crate::DefaultLinkOps>::Ops,
             pointer_ops: $crate::DefaultPointerOps<$pointer>,
         }
@@ -230,41 +231,36 @@
         }
     };
     (@find_generic
-        $(#[$attr:meta])* ($($privacy:tt)*) $name:ident ($($prev:tt)*) > $($rest:tt)*
+        $(#[$attr:meta])* $vis:vis $name:ident ($($prev:tt)*) > $($rest:tt)*
     ) => {
         intrusive_adapter!(@impl
-            $(#[$attr])* ($($privacy)*) $name ($($prev)*) $($rest)*
+            $(#[$attr])* $vis $name ($($prev)*) $($rest)*
         );
     };
     (@find_generic
-        $(#[$attr:meta])* ($($privacy:tt)*) $name:ident ($($prev:tt)*) $cur:tt $($rest:tt)*
+        $(#[$attr:meta])* $vis:vis $name:ident ($($prev:tt)*) $cur:tt $($rest:tt)*
     ) => {
         intrusive_adapter!(@find_generic
-            $(#[$attr])* ($($privacy)*) $name ($($prev)* $cur) $($rest)*
+            $(#[$attr])* $vis $name ($($prev)* $cur) $($rest)*
         );
     };
     (@find_if_generic
-        $(#[$attr:meta])* ($($privacy:tt)*) $name:ident < $($rest:tt)*
+        $(#[$attr:meta])* $vis:vis $name:ident < $($rest:tt)*
     ) => {
         intrusive_adapter!(@find_generic
-            $(#[$attr])* ($($privacy)*) $name () $($rest)*
+            $(#[$attr])* $vis $name () $($rest)*
         );
     };
     (@find_if_generic
-        $(#[$attr:meta])* ($($privacy:tt)*) $name:ident $($rest:tt)*
+        $(#[$attr:meta])* $vis:vis $name:ident $($rest:tt)*
     ) => {
         intrusive_adapter!(@impl
-            $(#[$attr])* ($($privacy)*) $name () $($rest)*
+            $(#[$attr])* $vis $name () $($rest)*
         );
     };
-    ($(#[$attr:meta])* pub $name:ident $($rest:tt)*) => {
+    ($(#[$attr:meta])* $vis:vis $name:ident $($rest:tt)*) => {
         intrusive_adapter!(@find_if_generic
-            $(#[$attr])* (pub) $name $($rest)*
-        );
-    };
-    ($(#[$attr:meta])* $name:ident $($rest:tt)*) => {
-        intrusive_adapter!(@find_if_generic
-            $(#[$attr])* () $name $($rest)*
+            $(#[$attr])* $vis $name $($rest)*
         );
     };
 }
diff --git a/src/rbtree.rs b/src/rbtree.rs
index 0eceb81..ad8f861 100644
--- a/src/rbtree.rs
+++ b/src/rbtree.rs
@@ -2260,7 +2260,7 @@
 
             while !expected.is_empty() {
                 {
-                    let index = rng.gen_range(0, expected.len());
+                    let index = rng.gen_range(0..expected.len());
                     let mut c = t.cursor_mut();
                     for _ in 0..(index + 1) {
                         c.move_next();