Skip to content

Commit

Permalink
fix: remove unnecessary qualifications
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed May 7, 2024
1 parent efeff6a commit ad5b359
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions stac/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- Removed unnecessary qualifications ([#251](https://github.com/stac-utils/stac-rs/pull/251))

## [0.7.0] - 2024-04-29

### Added
Expand Down
2 changes: 1 addition & 1 deletion stac/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Links for Catalog {
impl TryFrom<Catalog> for Map<String, Value> {
type Error = Error;
fn try_from(catalog: Catalog) -> Result<Self> {
if let serde_json::Value::Object(object) = serde_json::to_value(catalog)? {
if let Value::Object(object) = serde_json::to_value(catalog)? {
Ok(object)
} else {
panic!("all STAC catalogs should serialize to a serde_json::Value::Object")
Expand Down
2 changes: 1 addition & 1 deletion stac/src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ impl Extensions for Collection {
impl TryFrom<Collection> for Map<String, Value> {
type Error = Error;
fn try_from(collection: Collection) -> Result<Self> {
if let serde_json::Value::Object(object) = serde_json::to_value(collection)? {
if let Value::Object(object) = serde_json::to_value(collection)? {
Ok(object)
} else {
panic!("all STAC collections should serialize to a serde_json::Value::Object")
Expand Down
2 changes: 1 addition & 1 deletion stac/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ impl Extensions for Item {
impl TryFrom<Item> for Map<String, Value> {
type Error = Error;
fn try_from(item: Item) -> Result<Self> {
if let serde_json::Value::Object(object) = serde_json::to_value(item)? {
if let Value::Object(object) = serde_json::to_value(item)? {
Ok(object)
} else {
panic!("all STAC items should serialize to a serde_json::Value::Object")
Expand Down

0 comments on commit ad5b359

Please sign in to comment.