@@ -71,7 +71,7 @@ pub trait PyWeakrefMethods<'py> {
71
71
/// # fn main() -> PyResult<()> {
72
72
/// Python::with_gil(|py| {
73
73
/// let data = Bound::new(py, Foo{})?;
74
- /// let reference = PyWeakrefReference::new_bound (&data)?;
74
+ /// let reference = PyWeakrefReference::new (&data)?;
75
75
///
76
76
/// assert_eq!(
77
77
/// parse_data(reference.as_borrowed())?,
@@ -147,7 +147,7 @@ pub trait PyWeakrefMethods<'py> {
147
147
/// # fn main() -> PyResult<()> {
148
148
/// Python::with_gil(|py| {
149
149
/// let data = Bound::new(py, Foo{})?;
150
- /// let reference = PyWeakrefReference::new_bound (&data)?;
150
+ /// let reference = PyWeakrefReference::new (&data)?;
151
151
///
152
152
/// assert_eq!(
153
153
/// parse_data(reference.as_borrowed())?,
@@ -232,7 +232,7 @@ pub trait PyWeakrefMethods<'py> {
232
232
/// # fn main() -> PyResult<()> {
233
233
/// Python::with_gil(|py| {
234
234
/// let data = Bound::new(py, Foo{})?;
235
- /// let reference = PyWeakrefReference::new_bound (&data)?;
235
+ /// let reference = PyWeakrefReference::new (&data)?;
236
236
///
237
237
/// assert_eq!(
238
238
/// parse_data(reference.as_borrowed()),
@@ -306,7 +306,7 @@ pub trait PyWeakrefMethods<'py> {
306
306
/// # fn main() -> PyResult<()> {
307
307
/// Python::with_gil(|py| {
308
308
/// let data = Bound::new(py, Foo{})?;
309
- /// let reference = PyWeakrefReference::new_bound (&data)?;
309
+ /// let reference = PyWeakrefReference::new (&data)?;
310
310
///
311
311
/// assert_eq!(
312
312
/// parse_data(reference.as_borrowed()),
@@ -379,7 +379,7 @@ pub trait PyWeakrefMethods<'py> {
379
379
/// # fn main() -> PyResult<()> {
380
380
/// Python::with_gil(|py| {
381
381
/// let data = Bound::new(py, Foo{})?;
382
- /// let reference = PyWeakrefReference::new_bound (&data)?;
382
+ /// let reference = PyWeakrefReference::new (&data)?;
383
383
///
384
384
/// assert_eq!(
385
385
/// parse_data(reference.as_borrowed())?,
@@ -455,7 +455,7 @@ pub trait PyWeakrefMethods<'py> {
455
455
/// # fn main() -> PyResult<()> {
456
456
/// Python::with_gil(|py| {
457
457
/// let data = Bound::new(py, Foo{})?;
458
- /// let reference = PyWeakrefReference::new_bound (&data)?;
458
+ /// let reference = PyWeakrefReference::new (&data)?;
459
459
///
460
460
/// assert_eq!(
461
461
/// parse_data(reference.as_borrowed())?,
@@ -530,7 +530,7 @@ pub trait PyWeakrefMethods<'py> {
530
530
/// # fn main() -> PyResult<()> {
531
531
/// Python::with_gil(|py| {
532
532
/// let data = Bound::new(py, Foo{})?;
533
- /// let reference = PyWeakrefReference::new_bound (&data)?;
533
+ /// let reference = PyWeakrefReference::new (&data)?;
534
534
///
535
535
/// assert_eq!(
536
536
/// parse_data(reference.as_borrowed())?,
@@ -600,7 +600,7 @@ pub trait PyWeakrefMethods<'py> {
600
600
/// # fn main() -> PyResult<()> {
601
601
/// Python::with_gil(|py| {
602
602
/// let data = Bound::new(py, Foo{})?;
603
- /// let reference = PyWeakrefReference::new_bound (&data)?;
603
+ /// let reference = PyWeakrefReference::new (&data)?;
604
604
///
605
605
/// assert_eq!(
606
606
/// parse_data(reference.as_borrowed())?,
@@ -672,7 +672,7 @@ pub trait PyWeakrefMethods<'py> {
672
672
/// # fn main() -> PyResult<()> {
673
673
/// Python::with_gil(|py| {
674
674
/// let object = Bound::new(py, Foo{})?;
675
- /// let reference = PyWeakrefReference::new_bound (&object)?;
675
+ /// let reference = PyWeakrefReference::new (&object)?;
676
676
///
677
677
/// assert_eq!(
678
678
/// get_class(reference.as_borrowed())?,
@@ -733,7 +733,7 @@ pub trait PyWeakrefMethods<'py> {
733
733
/// # fn main() -> PyResult<()> {
734
734
/// Python::with_gil(|py| {
735
735
/// let object = Bound::new(py, Foo{})?;
736
- /// let reference = PyWeakrefReference::new_bound (&object)?;
736
+ /// let reference = PyWeakrefReference::new (&object)?;
737
737
///
738
738
/// assert_eq!(
739
739
/// get_class(reference.as_borrowed())?,
@@ -776,12 +776,12 @@ mod tests {
776
776
use crate :: { Bound , PyResult , Python } ;
777
777
778
778
fn new_reference < ' py > ( object : & Bound < ' py , PyAny > ) -> PyResult < Bound < ' py , PyWeakref > > {
779
- let reference = PyWeakrefReference :: new_bound ( object) ?;
779
+ let reference = PyWeakrefReference :: new ( object) ?;
780
780
reference. into_any ( ) . downcast_into ( ) . map_err ( Into :: into)
781
781
}
782
782
783
783
fn new_proxy < ' py > ( object : & Bound < ' py , PyAny > ) -> PyResult < Bound < ' py , PyWeakref > > {
784
- let reference = PyWeakrefProxy :: new_bound ( object) ?;
784
+ let reference = PyWeakrefProxy :: new ( object) ?;
785
785
reference. into_any ( ) . downcast_into ( ) . map_err ( Into :: into)
786
786
}
787
787
0 commit comments