Skip to content

Commit fca278c

Browse files
authored
chore: upgrade examples to Rust 2024 (#120)
* fix: tauri-todos build (regenerate lockfile) Previous lockfile failed to parse due to duplicated packages. * chore: upgrade examples to Rust 2024 `cargo fix --edition` did all the work except for changing the spelling of "crate_type" to "crate-type". * chore: run cargo fmt to make CI happy
1 parent 2efca5f commit fca278c

File tree

24 files changed

+557
-535
lines changed

24 files changed

+557
-535
lines changed

browser-chat/browser-wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "chat-browser"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[lib]
77
crate-type = ["cdylib", "rlib"]

browser-chat/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "chat-cli"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[dependencies]
77
anyhow = "1.0.95"

browser-chat/shared/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "chat-shared"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[dependencies]
77
anyhow = "1"

browser-echo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "browser-echo"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
default-run = "cli"
66

77
[lib]

browser-echo/src/node.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use anyhow::Result;
22
use async_channel::Sender;
33
use iroh::{
4+
Endpoint, NodeId,
45
endpoint::Connection,
56
protocol::{AcceptError, ProtocolHandler, Router},
6-
Endpoint, NodeId,
77
};
8-
use n0_future::{boxed::BoxStream, task, Stream, StreamExt};
8+
use n0_future::{Stream, StreamExt, boxed::BoxStream, task};
99
use serde::{Deserialize, Serialize};
1010
use tokio::sync::broadcast;
1111
use tokio_stream::wrappers::BroadcastStream;
@@ -46,7 +46,7 @@ impl EchoNode {
4646
&self,
4747
node_id: NodeId,
4848
payload: String,
49-
) -> impl Stream<Item = ConnectEvent> + Unpin {
49+
) -> impl Stream<Item = ConnectEvent> + Unpin + use<> {
5050
let (event_sender, event_receiver) = async_channel::bounded(16);
5151
let endpoint = self.router.endpoint().clone();
5252
task::spawn(async move {

browser-echo/src/wasm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use n0_future::{Stream, StreamExt};
33
use serde::Serialize;
44
use tracing::level_filters::LevelFilter;
55
use tracing_subscriber_wasm::MakeConsoleWriter;
6-
use wasm_bindgen::{prelude::wasm_bindgen, JsError, JsValue};
7-
use wasm_streams::{readable::sys::ReadableStream as JsReadableStream, ReadableStream};
6+
use wasm_bindgen::{JsError, JsValue, prelude::wasm_bindgen};
7+
use wasm_streams::{ReadableStream, readable::sys::ReadableStream as JsReadableStream};
88

99
use crate::node;
1010

dumbpipe-web/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "reverse-proxy"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
license = "Apache-2.0/MIT"
66

77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

dumbpipe-web/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77
use anyhow::Context;
88
use bytes::Bytes;
99
use clap::Parser;
10-
use http_body_util::{combinators::BoxBody, BodyExt, Full};
10+
use http_body_util::{BodyExt, Full, combinators::BoxBody};
1111
use hyper::client::conn::http1::Builder;
1212
use hyper::server::conn::http1;
1313
use hyper::service::service_fn;

extism/host/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "extism-host"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[dependencies]
77
anyhow = "1.0.79"
88
extism = "1.0.0"
99
tokio = { version = "1", features = ["full"] }
10-
iroh-extism-host-functions = { path = "../iroh-extism-host-functions" }
10+
iroh-extism-host-functions = { path = "../iroh-extism-host-functions" }

extism/iroh-extism-host-functions/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "iroh-extism-host-functions"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[dependencies]
77
anyhow = "1.0.79"

0 commit comments

Comments
 (0)