From d61e637bb9618cdc9a4660aad243581e22d6c28c Mon Sep 17 00:00:00 2001 From: John Bampton Date: Thu, 22 Feb 2024 15:52:48 +1000 Subject: [PATCH] docs: fix grammar and spelling in Markdown in `examples/rust` (#4241) --- examples/rust/00-setup/README.md | 10 +++++----- examples/rust/01-init-operator/README.md | 12 ++++++------ examples/rust/02-async-io/README.md | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/rust/00-setup/README.md b/examples/rust/00-setup/README.md index 702ab6e65bd..e8e9aded442 100644 --- a/examples/rust/00-setup/README.md +++ b/examples/rust/00-setup/README.md @@ -1,12 +1,12 @@ # Chapter-00: Set up Your First Rust Project -Welcome to our first chapter. In this example we will set up our first rust project with OpenDAL. +Welcome to our first chapter. In this example we will set up our first Rust project with OpenDAL. ## Install Rust First of all, we need to install Rust. Refer [here](../../../CONTRIBUTING.md#bring-your-own-toolbox) to figure it out. -After rust has been installed, we will have the following components: +After Rust has been installed, we will have the following components: - `rustup`: [rustup](https://rust-lang.github.io/rustup/) is a command-line toolchain manager for the Rust programming language. It allows you to easily install, manage, and update different versions of the Rust compiler and associated tools on your system. - `cargo`: [cargo](https://doc.rust-lang.org/cargo/index.html) is the package manager and build system for the Rust programming language. It is designed to make it easy to develop, build, and manage Rust projects. @@ -26,7 +26,7 @@ A typical Rust project follows a specific directory structure. The most simple p - `Cargo.toml`: The Cargo.toml file is the manifest file for the project. It specifies metadata about the project, including its name, version, dependencies, and build configuration. It is also where you declare the project's dependencies using the Cargo package manager. - `src/`: The `src` directory is where the main source code files of the project reside. It typically contains the Rust source files with the code implementation for the project's functionality. -Let's go into more deep by our example code. +Let's go into more depth by our example code. ### `Cargo.toml` @@ -86,7 +86,7 @@ We will see output like: Hello, s3 ``` -Congrate! Our first rust project is built and running with success! +Congrats! Our first Rust project is built and running with success! After built, we will find that there are some new files created: @@ -95,4 +95,4 @@ After built, we will find that there are some new files created: ## Conclusion -In this chapter we have learnt the rust project structure and run our first rust example. We will use this knowledge to build our first rust application in the next chapter! +In this chapter we have learnt the Rust project structure and run our first Rust example. We will use this knowledge to build our first Rust application in the next chapter! diff --git a/examples/rust/01-init-operator/README.md b/examples/rust/01-init-operator/README.md index 3a7c79cc5e2..3387b7df2b9 100644 --- a/examples/rust/01-init-operator/README.md +++ b/examples/rust/01-init-operator/README.md @@ -59,11 +59,11 @@ fn main() -> Result<()> { > `use opendal::Result;` -imports opendal's `Result` which will shadows rust built-in result. +imports opendal's `Result` which will shadows Rust built-in result. > `fn main() -> Result<()>` -The way that rust to declare returning types of a function. This case means `main` will return a `Result` which holds `()`. +The way that Rust to declare returning types of a function. This case means `main` will return a `Result` which holds `()`. > `()` @@ -85,7 +85,7 @@ let op = init_operator_via_builder()?; - `xxx()` means call function that named `xxx`. - the `?` is a syntax sugar in Rust that checks if the returned `Result` is an `Err`. If it is, then it immediately returns that error. Otherwise, it returns the value of `Ok`. -So this line will call `init_operator_via_builder` function first and set to variable `op` if it's returns `Ok`. +So this line will call `init_operator_via_builder` function first and set to variable `op` if it returns `Ok`. ## Initiate Via Builder @@ -157,12 +157,12 @@ Please feel free to try initiating other services or configuring new settings fo ## Conclusion -In this chapter we learnt a lot basic concepts in rust! Now we have known that: +In this chapter we learnt a lot of basic concepts in Rust! Now we know: - How to define a function that returns something. - How to declare an immutable variable. - How to call functions in Rust. - How to define and use enums. -- How to handling result. +- How to handle results. -With our newly acquired rust skills, we can initiate the OpenDAL Operator in two main ways. This knowledge will be used to read and write data to storage in the next chapter! +With our newly acquired Rust skills, we can initiate the OpenDAL Operator in two main ways. This knowledge will be used to read and write data to storage in the next chapter! diff --git a/examples/rust/02-async-io/README.md b/examples/rust/02-async-io/README.md index d5890f51213..f86606fd61c 100644 --- a/examples/rust/02-async-io/README.md +++ b/examples/rust/02-async-io/README.md @@ -1,6 +1,6 @@ # Chapter-02: Async IO -In [Chapter-01](../01-init-operator/README.md), we learnt how to initiate an `Operator`. All operations in OpenDAL is IO bound which means most of our users will use OpenDAL in an async runtime. This chapter will discuss how to call `Operator` in async runtime and how to use OpenDAL to read and write data! +In [Chapter-01](../01-init-operator/README.md), we learnt how to initiate an `Operator`. All operations in OpenDAL are IO bound which means most of our users will use OpenDAL in an async runtime. This chapter will discuss how to call `Operator` in async runtime and how to use OpenDAL to read and write data! ## Warmup @@ -115,7 +115,7 @@ impl Operator { This API means it accepts any types that implements `Into`. `Bytes` is provided by [`bytes::Bytes`](https://docs.rs/bytes/latest/bytes/struct.Bytes.html), we can find all types that implements `Into` here. -So we can also calling `write` on: +So we can also call `write` on: - `Vec` - `String`