Skip to content

Commit f9d93c0

Browse files
committed
Release v0.8.0
1 parent 7ef7930 commit f9d93c0

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Steven Fackler <sfackler@gmail.com>"]
55
license = "MIT"
66
description = "Array support for rust-postgres"
77
repository = "https://github.com/sfackler/rust-postgres-array"
8-
documentation = "https://sfackler.github.io/rust-postgres-array/doc/v0.8.0/postgres_array"
8+
documentation = "https://docs.rs/postgres_array/0.8.0/postgres_array"
99

1010
[dependencies]
1111
fallible-iterator = "0.1"

src/lib.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Multi-dimensional arrays with per-dimension specifiable lower bounds
2-
#![doc(html_root_url="https://sfackler.github.io/rust-postgres-array/doc/v0.7.1")]
2+
#![doc(html_root_url="https://docs.rs/postgres_array/0.8.0")]
33

44
extern crate fallible_iterator;
55
#[macro_use]
@@ -25,8 +25,10 @@ impl Dimension {
2525
fn shift(&self, idx: i32) -> i32 {
2626
let offset = self.lower_bound;
2727
assert!(idx >= offset, "out of bounds array access");
28-
assert!(offset >= 0 || idx <= 0 || i32::max_value() - (-offset) >= idx,
29-
"out of bounds array access");
28+
assert!(
29+
offset >= 0 || idx <= 0 || i32::max_value() - (-offset) >= idx,
30+
"out of bounds array access"
31+
);
3032
match idx.checked_sub(offset) {
3133
Some(shifted) => shifted,
3234
None => panic!("out of bounds array access"),
@@ -41,10 +43,15 @@ mod tests {
4143
#[test]
4244
fn test_from_vec() {
4345
let a = Array::from_vec(vec![0i32, 1, 2], -1);
44-
assert!(&[Dimension {
45-
len: 3,
46-
lower_bound: -1,
47-
}][..] == a.dimensions());
46+
assert!(
47+
&[
48+
Dimension {
49+
len: 3,
50+
lower_bound: -1,
51+
},
52+
]
53+
[..] == a.dimensions()
54+
);
4855
assert_eq!(0, a[-1]);
4956
assert_eq!(1, a[0]);
5057
assert_eq!(2, a[1]);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy