Skip to content

add #[track_caller] to the Row::get() functions #1104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- run: docker compose up -d
- uses: sfackler/actions/rustup@master
with:
version: 1.71.0
version: 1.74.0
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
id: rust-version
- uses: actions/cache@v3
Expand Down
2 changes: 2 additions & 0 deletions tokio-postgres/src/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl Row {
/// # Panics
///
/// Panics if the index is out of bounds or if the value cannot be converted to the specified type.
#[track_caller]
pub fn get<'a, I, T>(&'a self, idx: I) -> T
where
I: RowIndex + fmt::Display,
Expand Down Expand Up @@ -239,6 +240,7 @@ impl SimpleQueryRow {
/// # Panics
///
/// Panics if the index is out of bounds or if the value cannot be converted to the specified type.
#[track_caller]
pub fn get<I>(&self, idx: I) -> Option<&str>
where
I: RowIndex + fmt::Display,
Expand Down