Skip to content

Commit 43a2551

Browse files
committed
Rename InfoContext::build_from to build_one_section.
1 parent b86b07a commit 43a2551

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

examples/test_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn add_info(ctx: &InfoContext, _for_crash_report: bool) -> RedisResult<()> {
4848
field: "test_helper_value".to_owned(),
4949
dictionary,
5050
};
51-
ctx.build_from(data)
51+
ctx.build_one_section(data)
5252
}
5353

5454
//////////////////////////////////////////////////////

redismodule-rs-macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ pub fn info_command_handler(_attr: TokenStream, item: TokenStream) -> TokenStrea
425425
/// ctx: &InfoContext,
426426
/// _for_crash_report: bool) -> RedisResult
427427
/// {
428-
/// ctx.build_from(INFO)
428+
/// ctx.build_one_section(INFO)
429429
/// }
430430
/// ```
431431
///

src/context/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ impl InfoContext {
12141214
}
12151215

12161216
/// Returns a build result for the passed [`OneInfoSectionData`].
1217-
pub fn build_from<T: Into<OneInfoSectionData>>(&self, data: T) -> RedisResult<()> {
1217+
pub fn build_one_section<T: Into<OneInfoSectionData>>(&self, data: T) -> RedisResult<()> {
12181218
self.builder()
12191219
.add_section_unchecked(data.into())
12201220
.build_info()?;

src/context/thread_safe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::ops::{Deref, DerefMut};
44
use std::ptr;
55

66
use crate::context::blocked::BlockedClient;
7-
use crate::{raw, Context, RedisValueResult};
7+
use crate::{raw, Context, RedisResult};
88

99
pub struct RedisGILGuardScope<'ctx, 'mutex, T, G: RedisLockIndicator> {
1010
_context: &'ctx G,
@@ -158,7 +158,7 @@ impl ThreadSafeContext<BlockedClient> {
158158
/// The Redis modules API does not require locking for `Reply` functions,
159159
/// so we pass through its functionality directly.
160160
#[allow(clippy::must_use_candidate)]
161-
pub fn reply(&self, r: RedisValueResult) -> raw::Status {
161+
pub fn reply(&self, r: RedisResult) -> raw::Status {
162162
let ctx = Context::new(self.ctx);
163163
ctx.reply(r)
164164
}

0 commit comments

Comments
 (0)