mirror of
https://github.com/lune-org/lune.git
synced 2025-04-10 21:40:54 +01:00
Add note about results in value format impl
This commit is contained in:
parent
3433fb4c4f
commit
7f80093eaa
1 changed files with 7 additions and 3 deletions
|
@ -13,9 +13,13 @@ pub use self::config::ValueFormatConfig;
|
||||||
use self::basic::{format_value_styled, lua_value_as_plain_string_key};
|
use self::basic::{format_value_styled, lua_value_as_plain_string_key};
|
||||||
use self::style::STYLE_DIM;
|
use self::style::STYLE_DIM;
|
||||||
|
|
||||||
type FmtResult = Result<String, fmt::Error>;
|
// NOTE: We return a result here but it's really just to make handling
|
||||||
|
// of the `write!` calls easier. Writing into a string should never fail.
|
||||||
fn format_value_inner(value: &LuaValue, config: &ValueFormatConfig, depth: usize) -> FmtResult {
|
fn format_value_inner(
|
||||||
|
value: &LuaValue,
|
||||||
|
config: &ValueFormatConfig,
|
||||||
|
depth: usize,
|
||||||
|
) -> Result<String, fmt::Error> {
|
||||||
let mut buffer = String::new();
|
let mut buffer = String::new();
|
||||||
|
|
||||||
// TODO: Rewrite this section to not be recursive and
|
// TODO: Rewrite this section to not be recursive and
|
||||||
|
|
Loading…
Add table
Reference in a new issue