Skip to content

Commit a65111c

Browse files
committed
rename to generic_iterable.rs
1 parent 9e196fe commit a65111c

File tree

6 files changed

+335
-128
lines changed

6 files changed

+335
-128
lines changed

src/input/any_iterable.rs

Lines changed: 0 additions & 119 deletions
This file was deleted.

src/input/input_abstract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use pyo3::{intern, prelude::*};
66
use crate::errors::{InputValue, LocItem, ValResult};
77
use crate::{PyMultiHostUrl, PyUrl};
88

9-
use super::any_iterable::GenericIterable;
109
use super::datetime::{EitherDate, EitherDateTime, EitherTime, EitherTimedelta};
10+
use super::generic_iterable::GenericIterable;
1111
use super::return_enums::{EitherBytes, EitherString};
1212
use super::{GenericArguments, GenericCollection, GenericIterator, GenericMapping, JsonInput};
1313

src/input/input_json.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ impl<'a> Input<'a> for JsonInput {
199199
self.validate_tuple(false)
200200
}
201201

202-
fn extract_iterable(&'a self) -> ValResult<super::any_iterable::GenericIterable<'a>> {
202+
fn extract_iterable(&'a self) -> ValResult<super::generic_iterable::GenericIterable<'a>> {
203203
match self {
204-
JsonInput::Array(a) => Ok(super::any_iterable::GenericIterable::JsonArray(a)),
205-
JsonInput::Object(o) => Ok(super::any_iterable::GenericIterable::JsonObject(o)),
204+
JsonInput::Array(a) => Ok(super::generic_iterable::GenericIterable::JsonArray(a)),
205+
JsonInput::Object(o) => Ok(super::generic_iterable::GenericIterable::JsonObject(o)),
206206
_ => Err(ValError::new(ErrorType::IterableType, self)),
207207
}
208208
}
@@ -377,7 +377,7 @@ impl<'a> Input<'a> for String {
377377
self.validate_dict(false)
378378
}
379379

380-
fn extract_iterable(&'a self) -> ValResult<super::any_iterable::GenericIterable<'a>> {
380+
fn extract_iterable(&'a self) -> ValResult<super::generic_iterable::GenericIterable<'a>> {
381381
Err(ValError::new(ErrorType::IterableType, self))
382382
}
383383

src/input/input_python.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use pyo3::types::{
1111
use pyo3::types::{PyDictItems, PyDictKeys, PyDictValues};
1212
use pyo3::{ffi, intern, AsPyPointer, PyTypeInfo};
1313

14-
use super::any_iterable::GenericIterable;
14+
use super::generic_iterable::GenericIterable;
1515
use crate::build_tools::safe_repr;
1616
use crate::errors::{ErrorType, InputValue, LocItem, ValError, ValResult};
1717
use crate::{ArgsKwargs, PyMultiHostUrl, PyUrl};
@@ -459,7 +459,7 @@ impl<'a> Input<'a> for PyAny {
459459
}
460460
}
461461

462-
fn extract_iterable(&'a self) -> ValResult<super::any_iterable::GenericIterable<'a>> {
462+
fn extract_iterable(&'a self) -> ValResult<super::generic_iterable::GenericIterable<'a>> {
463463
// Handle concrete non-overlapping types first, then abstract types
464464
if let Ok(iterable) = self.downcast::<PyList>() {
465465
Ok(GenericIterable::List(iterable))

src/input/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use std::os::raw::c_int;
22

33
use pyo3::prelude::*;
44

5-
mod any_iterable;
65
mod datetime;
6+
mod generic_iterable;
77
mod input_abstract;
88
mod input_json;
99
mod input_python;
@@ -12,11 +12,11 @@ mod parse_json;
1212
mod return_enums;
1313
mod shared;
1414

15-
pub(crate) use any_iterable::GenericIterable;
1615
pub(crate) use datetime::{
1716
pydate_as_date, pydatetime_as_datetime, pytime_as_time, pytimedelta_as_duration, EitherDate, EitherDateTime,
1817
EitherTime, EitherTimedelta,
1918
};
19+
pub(crate) use generic_iterable::GenericIterable;
2020
pub(crate) use input_abstract::{Input, InputType};
2121
pub(crate) use parse_json::{JsonInput, JsonObject};
2222
pub(crate) use return_enums::{

0 commit comments

Comments
 (0)