Skip to content

Commit afccfb0

Browse files
authored
Improve grammatical integrity of Environment & Configuration page (#70)
1 parent a3c00cb commit afccfb0

File tree

1 file changed

+8
-8
lines changed
  • src/environment-and-configuration

1 file changed

+8
-8
lines changed

src/environment-and-configuration/index.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ else
1818
Console.WriteLine($"Variable '{name}' set to '{value}'.");
1919
```
2020

21-
Rust is providing the same functionality of accessing an environment variable at
21+
Rust provides the same environment variable access functionality at
2222
runtime via the `var` and `var_os` functions from the `std::env` module.
2323

24-
`var` function is returning a `Result<String, VarError>`, either returning the
25-
variable if set or returning an error if the variable is not set or it is not
24+
The `var` function will return a `Result<String, VarError>`, and either returns the
25+
variable if it is set or returns an error if the variable is either not set or is not
2626
valid Unicode.
2727

2828
`var_os` has a different signature giving back an `Option<OsString>`, either
@@ -54,7 +54,7 @@ fn main() {
5454
}
5555
```
5656

57-
Rust is also providing the functionality of accessing an environment variable at
57+
Rust also provides environment variable access functionality at
5858
compile time. The `env!` macro from `std::env` expands the value of the variable
5959
at compile time, returning a `&'static str`. If the variable is not set, an
6060
error is emitted.
@@ -68,15 +68,15 @@ fn main() {
6868
}
6969
```
7070

71-
In .NET a compile time access to environment variables can be achieved, in a
71+
In .NET compile time access to environment variables can be achieved, albeit in a
7272
less straightforward way, via [source generators][source-gen].
7373

7474
[source-gen]: https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview
7575

7676
## Configuration
7777

78-
Configuration in .NET is possible with configuration providers. The framework is
79-
providing several provider implementations via
78+
Configuration in .NET is possible with configuration providers. The framework
79+
provides several provider implementations via
8080
`Microsoft.Extensions.Configuration` namespace and NuGet packages.
8181

8282
Configuration providers read configuration data from key-value pairs using
@@ -100,7 +100,7 @@ class Example {
100100
}
101101
```
102102

103-
Other providers examples can be found in the official documentation
103+
Other provider examples can be found in the official documentation
104104
[Configurations provider in .NET][conf-net].
105105

106106
A similar configuration experience in Rust is available via use of third-party

0 commit comments

Comments
 (0)