mirror of
https://github.com/nushell/nushell.git
synced 2025-05-29 14:21:45 +02:00
remove dbg!
This commit is contained in:
parent
a56036aa10
commit
28ed857102
@ -270,7 +270,6 @@ impl Command for IntoDatetime {
|
||||
struct DatetimeFormat(String);
|
||||
|
||||
fn action(input: &Value, args: &Arguments, head: Span) -> Value {
|
||||
dbg!(input, args);
|
||||
let timezone = &args.zone_options;
|
||||
let dateformat = &args.format_options;
|
||||
|
||||
@ -314,7 +313,6 @@ fn action(input: &Value, args: &Arguments, head: Span) -> Value {
|
||||
}
|
||||
}
|
||||
|
||||
dbg!(input);
|
||||
return merge_record(record, head, *internal_span);
|
||||
}
|
||||
|
||||
@ -335,7 +333,6 @@ fn action(input: &Value, args: &Arguments, head: Span) -> Value {
|
||||
// Propagate errors by explicitly matching them before the final case.
|
||||
Value::Error { .. } => return input.clone(),
|
||||
other => {
|
||||
dbg!(other);
|
||||
return Value::error(
|
||||
ShellError::OnlySupportsThisInputType {
|
||||
exp_input_type: "string and int".into(),
|
||||
@ -487,7 +484,6 @@ fn action(input: &Value, args: &Arguments, head: Span) -> Value {
|
||||
}
|
||||
};
|
||||
|
||||
dbg!(input);
|
||||
match input {
|
||||
Value::String { val, .. } => parse_as_string(val),
|
||||
Value::Int { val, .. } => parse_as_string(&val.to_string()),
|
||||
@ -575,7 +571,6 @@ fn merge_record(record: &Record, head: Span, span: Span) -> Value {
|
||||
Some(val) => match val {
|
||||
Value::Int { val, .. } => *val as i32,
|
||||
other => {
|
||||
dbg!(other);
|
||||
return Value::error(
|
||||
ShellError::OnlySupportsThisInputType {
|
||||
exp_input_type: "int".to_string(),
|
||||
@ -609,7 +604,6 @@ fn merge_record(record: &Record, head: Span, span: Span) -> Value {
|
||||
offset
|
||||
}
|
||||
other => {
|
||||
dbg!(other);
|
||||
return Value::error(
|
||||
ShellError::OnlySupportsThisInputType {
|
||||
exp_input_type: "string".to_string(),
|
||||
@ -624,17 +618,6 @@ fn merge_record(record: &Record, head: Span, span: Span) -> Value {
|
||||
None => FixedOffset::east_opt(0).unwrap(),
|
||||
};
|
||||
|
||||
dbg!(&nanosecond);
|
||||
dbg!(µsecond);
|
||||
dbg!(&millisecond);
|
||||
dbg!(&second);
|
||||
dbg!(&minute);
|
||||
dbg!(&hour);
|
||||
dbg!(&day);
|
||||
dbg!(&month);
|
||||
dbg!(&year);
|
||||
dbg!(&offset);
|
||||
|
||||
let total_nanoseconds = nanosecond + microsecond * 1_000 + millisecond * 1_000_000;
|
||||
|
||||
let date = match NaiveDate::from_ymd_opt(year, month, day) {
|
||||
@ -667,11 +650,6 @@ fn merge_record(record: &Record, head: Span, span: Span) -> Value {
|
||||
};
|
||||
let date_time = NaiveDateTime::new(date, time);
|
||||
|
||||
dbg!(&date);
|
||||
dbg!(&time);
|
||||
dbg!(&date_time);
|
||||
dbg!(&offset);
|
||||
|
||||
// let datetime_with_timezone = DateTime::from_naive_utc_and_offset(date_time, offset);
|
||||
let date_time_fixed = match offset.from_local_datetime(&date_time).single() {
|
||||
Some(d) => d,
|
||||
@ -712,7 +690,6 @@ fn parse_value_from_record_as_u32(
|
||||
*val as u32
|
||||
}
|
||||
other => {
|
||||
dbg!(other);
|
||||
return Err(Value::error(
|
||||
ShellError::OnlySupportsThisInputType {
|
||||
exp_input_type: "int".to_string(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user