Skip to content

Commit 79c7e28

Browse files
authored
Merge pull request #1812 from tiran/datetime_use_crate
Use 'crate::' to refer to pyo3
2 parents 0613b5a + d74c3f6 commit 79c7e28

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3030
[#1799](https://github.com/PyO3/pyo3/pull/1799)
3131
- Add missing `Py_DECREF` to `Python::run_code` and `PyModule::from_code` which fixes a memory leak when
3232
calling Python from Rust. [#1806](https://github.com/PyO3/pyo3/pull/1806), [#1810](https://github.com/PyO3/pyo3/pull/1810)
33+
- Use crate:: syntax to refer to current crate in pyo3::types::datetime
34+
[#1811](https://github.com/PyO3/pyo3/issues/1811)
3335

3436
## [0.14.2] - 2021-08-09
3537

src/types/datetime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ mod tests {
465465
#[cfg(not(PyPy))]
466466
#[test]
467467
fn test_new_with_fold() {
468-
pyo3::Python::with_gil(|py| {
469-
use pyo3::types::{PyDateTime, PyTimeAccess};
468+
crate::Python::with_gil(|py| {
469+
use crate::types::{PyDateTime, PyTimeAccess};
470470

471471
let a = PyDateTime::new_with_fold(py, 2021, 1, 23, 20, 32, 40, 341516, None, false);
472472
let b = PyDateTime::new_with_fold(py, 2021, 1, 23, 20, 32, 40, 341516, None, true);

0 commit comments

Comments
 (0)