Skip to content

Commit

Permalink
fix: bump opendal-memory example
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaro00 committed Jan 9, 2025
1 parent d1a69ab commit 734deae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
10 changes: 5 additions & 5 deletions rocket/opendal-memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ version = "0.1.0"
edition = "2021"

[dependencies]
shuttle-runtime = "0.50.0"
shuttle-opendal = "0.50.0"
tokio = "1.26.0"
shuttle-rocket = "0.50.0"
opendal = "0.45"
opendal = "0.51"
rocket = { version = "0.5.0", features = ["json"] }
serde = { version = "1.0.148", features = ["derive"] }
shuttle-opendal = "0.50.0"
shuttle-rocket = "0.50.0"
shuttle-runtime = "0.50.0"
tokio = "1.26.0"
7 changes: 0 additions & 7 deletions rocket/opendal-memory/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# OpenDAL Memory Storage

This example shows that how to connect to an in-memory storage using OpenDAL.

## Project structure

The project consists of the following files

- `Shuttle.toml` contains the name of the app
- `src/main.rs` is where all the magic happens - it creates a Shuttle service with two endpoints: one for adding new data and one for retrieving it back.
2 changes: 1 addition & 1 deletion rocket/opendal-memory/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async fn retrieve(path: String, state: &State<MyState>) -> Result<String, BadReq
.read(&path)
.await
.map_err(|e| BadRequest(e.to_string()))?;
let data = String::from_utf8_lossy(&bs).to_string();
let data = String::from_utf8_lossy(&bs.to_vec()).to_string();
Ok(data)
}

Expand Down

0 comments on commit 734deae

Please sign in to comment.