Skip to content

Commit c037ab1

Browse files
author
TeachLink Dev
committed
style: fix rustfmt formatting in documentation modules
1 parent ff06be2 commit c037ab1

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

contracts/documentation/src/articles.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ impl ArticleManager {
5858
}
5959

6060
/// Update title, content, and tags of an existing article.
61-
pub fn update(env: &Env, id: String, title: String, content: String, tags: Vec<String>) -> Article {
61+
pub fn update(
62+
env: &Env,
63+
id: String,
64+
title: String,
65+
content: String,
66+
tags: Vec<String>,
67+
) -> Article {
6268
let mut article: Article = env.storage().instance().get(&id).unwrap();
6369

6470
article.title = title;

contracts/documentation/src/faq.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ impl FaqManager {
3434

3535
env.storage().instance().set(&id, &faq);
3636

37-
let count: u64 = env
38-
.storage()
39-
.instance()
40-
.get(&DocKey::FaqCount)
41-
.unwrap_or(0);
37+
let count: u64 = env.storage().instance().get(&DocKey::FaqCount).unwrap_or(0);
4238
env.storage()
4339
.instance()
4440
.set(&DocKey::FaqCount, &(count + 1));
@@ -53,9 +49,6 @@ impl FaqManager {
5349

5450
/// Return total number of FAQ entries stored.
5551
pub fn count(env: &Env) -> u64 {
56-
env.storage()
57-
.instance()
58-
.get(&DocKey::FaqCount)
59-
.unwrap_or(0)
52+
env.storage().instance().get(&DocKey::FaqCount).unwrap_or(0)
6053
}
6154
}

contracts/documentation/src/versioning.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ pub struct Versioning;
99
impl Versioning {
1010
/// Return the current documentation version.
1111
pub fn get(env: &Env) -> u32 {
12-
env.storage()
13-
.instance()
14-
.get(&DocKey::Version)
15-
.unwrap_or(1)
12+
env.storage().instance().get(&DocKey::Version).unwrap_or(1)
1613
}
1714

1815
/// Set a new documentation version.

0 commit comments

Comments
 (0)