Skip to content

Commit

Permalink
Merge branch 'master' into 2951-ci-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Nov 8, 2022
2 parents 569cbf6 + 313ed58 commit c1e5e4c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
toolchain: stable
override: true

- uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # v2.0.1
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd # v2.1.0
with:
key: ${{ matrix.crate }}

Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
override: true
target: ${{ matrix.target }}

- uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # v2.0.1
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd # v2.1.0

- run: cargo check --package libp2p --all-features --target=${{ matrix.target }}

Expand All @@ -120,7 +120,7 @@ jobs:
toolchain: stable
override: true

- uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # v2.0.1
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd # v2.1.0
with:
key: ${{ matrix.runtime }}

Expand All @@ -141,7 +141,7 @@ jobs:
toolchain: stable
override: true

- uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # v2.0.1
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd # v2.1.0

- name: Check rustdoc links
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links --deny warnings" cargo doc --verbose --workspace --no-deps --all-features --document-private-items
Expand All @@ -168,7 +168,7 @@ jobs:
override: true
components: clippy

- uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # v2.0.1
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd # v2.1.0

- name: Run cargo clippy
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
Expand All @@ -190,7 +190,7 @@ jobs:
toolchain: stable
override: true

- uses: Swatinem/rust-cache@22c9328bcba27aa81a32b1bef27c7e3c78052531 # v2.0.1
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd # v2.1.0

- name: Run ipfs-kad example
run: RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run --example ipfs-kad --features full
Expand Down
4 changes: 2 additions & 2 deletions swarm/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub trait NetworkBehaviour: 'static {
///
/// Note that the handler is returned to the [`NetworkBehaviour`] on connection failure and
/// connection closing.
fn new_handler(&mut self) -> Self::ConnectionHandler;
fn new_handler(&mut self, initial_event: Option<THandlerInEvent<Self::ConnectionHandler>>) -> Self::ConnectionHandler;

/// Addresses that this behaviour is aware of for this specific peer, and that may allow
/// reaching the peer.
Expand Down Expand Up @@ -484,7 +484,7 @@ pub enum NetworkBehaviourAction<
/// # #[derive(Debug, PartialEq, Eq)]
/// # struct PreciousMessage(String);
/// ```
Dial { opts: DialOpts, handler: THandler },
Dial { opts: DialOpts, initial_event: TInEvent },

/// Instructs the `Swarm` to send an event to the handler dedicated to a
/// connection with a peer.
Expand Down
2 changes: 1 addition & 1 deletion swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ where
fn dial_with_handler(
&mut self,
swarm_dial_opts: DialOpts,
handler: <TBehaviour as NetworkBehaviour>::ConnectionHandler,
initial_in_event: <<<TBehaviour as NetworkBehaviour>::ConnectionHandler>::Handler>::InEvent,
) -> Result<(), DialError> {
let (peer_id, addresses, dial_concurrency_factor_override, role_override) =
match swarm_dial_opts.0 {
Expand Down

0 comments on commit c1e5e4c

Please sign in to comment.