From bc10a92a21134f3b9ad9d4a39388b2a71489e601 Mon Sep 17 00:00:00 2001 From: Jubilee Date: Thu, 5 Sep 2024 23:39:47 -0700 Subject: [PATCH] flip-flop on deprecatedness --- pgrx-tests/src/tests/spi_tests.rs | 7 ------- pgrx/src/spi/client.rs | 2 -- pgrx/src/spi/query.rs | 1 - 3 files changed, 10 deletions(-) diff --git a/pgrx-tests/src/tests/spi_tests.rs b/pgrx-tests/src/tests/spi_tests.rs index affb0dbcc..fd8ed2cd2 100644 --- a/pgrx-tests/src/tests/spi_tests.rs +++ b/pgrx-tests/src/tests/spi_tests.rs @@ -203,7 +203,6 @@ mod tests { } #[pg_test] - #[allow(deprecated)] fn test_cursor() -> Result<(), spi::Error> { Spi::connect(|mut client| { client.update("CREATE TABLE tests.cursor_table (id int)", None, None)?; @@ -224,7 +223,6 @@ mod tests { } #[pg_test] - #[allow(deprecated)] fn test_cursor_prepared_statement() -> Result<(), pgrx::spi::Error> { Spi::connect(|mut client| { client.update("CREATE TABLE tests.cursor_table (id int)", None, None)?; @@ -263,7 +261,6 @@ mod tests { test_cursor_prepared_statement_panics_impl(Some([None, None].to_vec())) } - #[allow(deprecated)] fn test_cursor_prepared_statement_panics_impl( args: Option>>, ) -> Result<(), pgrx::spi::Error> { @@ -285,7 +282,6 @@ mod tests { } #[pg_test] - #[allow(deprecated)] fn test_cursor_by_name() -> Result<(), pgrx::spi::Error> { let cursor_name = Spi::connect(|mut client| { client.update("CREATE TABLE tests.cursor_table (id int)", None, None)?; @@ -317,7 +313,6 @@ mod tests { } #[pg_test(error = "syntax error at or near \"THIS\"")] - #[allow(deprecated)] fn test_cursor_failure() { Spi::connect(|client| { client.open_cursor("THIS IS NOT SQL", None); @@ -325,7 +320,6 @@ mod tests { } #[pg_test(error = "cursor: CursorNotFound(\"NOT A CURSOR\")")] - #[allow(deprecated)] fn test_cursor_not_found() { Spi::connect(|client| client.find_cursor("NOT A CURSOR").map(|_| ())).expect("cursor"); } @@ -358,7 +352,6 @@ mod tests { } #[pg_test] - #[allow(deprecated)] fn test_spi_non_mut() -> Result<(), pgrx::spi::Error> { // Ensures update and cursor APIs do not need mutable reference to SpiClient Spi::connect(|mut client| { diff --git a/pgrx/src/spi/client.rs b/pgrx/src/spi/client.rs index 96926480b..e32728d74 100644 --- a/pgrx/src/spi/client.rs +++ b/pgrx/src/spi/client.rs @@ -123,7 +123,6 @@ impl<'conn> SpiClient<'conn> { /// # Panics /// /// Panics if a cursor wasn't opened. - #[deprecated(since = "0.12.2", note = "undefined behavior")] pub fn open_cursor>(&self, query: Q, args: Q::Arguments) -> SpiCursor<'conn> { self.try_open_cursor(query, args).unwrap() } @@ -152,7 +151,6 @@ impl<'conn> SpiClient<'conn> { /// # Panics /// /// Panics if a cursor wasn't opened. - #[deprecated(since = "0.12.2", note = "undefined behavior")] pub fn open_cursor_mut>( &mut self, query: Q, diff --git a/pgrx/src/spi/query.rs b/pgrx/src/spi/query.rs index 0f5b828b1..2ae6ba09d 100644 --- a/pgrx/src/spi/query.rs +++ b/pgrx/src/spi/query.rs @@ -29,7 +29,6 @@ pub trait Query<'conn>: Sized { /// # Panics /// /// Panics if a cursor wasn't opened. - #[deprecated(since = "0.12.2", note = "undefined behavior")] fn open_cursor(self, client: &SpiClient<'conn>, args: Self::Arguments) -> SpiCursor<'conn> { self.try_open_cursor(client, args).unwrap() }