Skip to content

fix(doc): fix codeblock rendering #2592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions core/src/docs/comparisons/vs_object_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ You will see the different visions lead to very different routes.

Users need to build a `dyn ObjectStore` and operate on it directly:

```Rust
```rust
let object_store: Arc<dyn ObjectStore> = Arc::new(get_object_store());
let path: Path = "data/file01.parquet".try_into()?;
let stream = object_store
Expand All @@ -68,7 +68,7 @@ let stream = object_store

But `opendal` don't expose this trait to end users directly. Instead, `opendal` expose a new struct called [`Operator`][crate::Operator] and builds public API on it.

```Rust
```rust
let op: Operator = Operator::from_env(Scheme::S3)?;
let r = op.reader("data/file01.parquet").await?;
```
Expand All @@ -79,13 +79,13 @@ Both `object_store` and `opendal` provide a mechanism to intercept operations.

`object_store` called `Adapters`:

```Rust
```rust
let object_store = ThrottledStore::new(get_object_store(), ThrottleConfig::default())
```

`opendal` called [`Layer`](crate::raw::Layer):

```Rust
```rust
let op = op.layer(TracingLayer).layer(MetricsLayer);
```

Expand Down Expand Up @@ -157,7 +157,7 @@ The most straightforward complete demo how to read a file from s3:

`opendal`

```Rust
```rust
let mut builder = S3::default();
builder.bucket("example");
builder.access_key_id("access_key_id");
Expand All @@ -169,7 +169,7 @@ let r = store.reader("data.parquet").await?;

`object_store`

```Rust
```rust
let mut builder = AmazonS3Builder::new()
.with_bucket_name("example")
.with_access_key_id("access_key_id")
Expand Down