Skip to content

Commit 29e27c3

Browse files
1 parent c18970e commit 29e27c3

File tree

3 files changed

+37
-33
lines changed

3 files changed

+37
-33
lines changed

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ representative at an online or offline event.
7373

7474
Instances of abusive, harassing, or otherwise unacceptable behavior may be
7575
reported to the community leaders responsible for enforcement at
76-
[email protected]. All complaints will be reviewed and investigated
77-
promptly and fairly. All community leaders are obligated to respect the privacy
78-
and security of the reporter of any incident.
76+
[email protected]. All complaints will be reviewed and investigated promptly
77+
and fairly. All community leaders are obligated to respect the privacy and
78+
security of the reporter of any incident.
7979

8080
## Enforcement Guidelines
8181

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ representative at an online or offline event.
6161

6262
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6363
reported to the community leaders responsible for enforcement at
64-
[email protected]. All complaints will be reviewed and investigated
65-
promptly and fairly. All community leaders are obligated to respect the privacy
66-
and security of the reporter of any incident.
64+
[email protected]. All complaints will be reviewed and investigated promptly
65+
and fairly. All community leaders are obligated to respect the privacy and
66+
security of the reporter of any incident.
6767

6868
## Enforcement Guidelines
6969

README.md

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -197,41 +197,45 @@ follows:
197197
1. **Implement a Trait:** In `Mountain/Source/Environment/`, provide the
198198
concrete implementation for a `Common` trait.
199199

200-
```rust
201-
// In Mountain/Source/Environment/FileSystemProvider.rs
202-
203-
use Common::FileSystem::{FileSystemReader, FileSystemWriter};
204-
205-
#[async_trait]
206-
impl FileSystemReader for MountainEnvironment {
207-
async fn ReadFile(&self, Path: &PathBuf) -> Result<Vec<u8>, CommonError> {
208-
// ... actual `tokio::fs` call ...
209-
200+
```rust
201+
202+
// In Mountain/Source/Environment/FileSystemProvider.rs
203+
204+
use Common::FileSystem::{FileSystemReader, FileSystemWriter};
205+
206+
#[async_trait]
207+
impl FileSystemReader for MountainEnvironment {
208+
async fn ReadFile(&self, Path: &PathBuf) -> Result<Vec<u8>, CommonError> {
209+
210+
// ... actual `tokio::fs` call ...
211+
212+
}
213+
214+
// ...
215+
210216
}
211-
// ...
212-
213-
}
214-
```
217+
```
215218

216219
2. **Create and Execute an Effect:** In business logic, create and run an
217220
effect.
218221

219-
```rust
220-
// In a Mountain service or command
221-
222-
use Common::FileSystem;
223-
use Common::Effect::ApplicationRunTime;
222+
```rust
223+
224+
// In a Mountain service or command
225+
226+
use Common::FileSystem;
227+
use Common::Effect::ApplicationRunTime;
224228

225-
async fn some_logic(runtime: Arc<impl ApplicationRunTime>) {
226-
let path = PathBuf::from("/my/file.txt");
227-
let read_effect = FileSystem::ReadFile(path);
229+
async fn some_logic(runtime: Arc<impl ApplicationRunTime>) {
230+
let path = PathBuf::from("/my/file.txt");
231+
let read_effect = FileSystem::ReadFile(path);
228232

229-
match runtime.Run(read_effect).await {
230-
Ok(content) => info!("File content length: {}", content.len()),
231-
Err(e) => error!("Failed to read file: {:?}", e),
233+
match runtime.Run(read_effect).await {
234+
Ok(content) => info!("File content length: {}", content.len()),
235+
Err(e) => error!("Failed to read file: {:?}", e),
236+
}
232237
}
233-
}
234-
```
238+
```
235239

236240
---
237241

0 commit comments

Comments
 (0)