Skip to content

Comments

fix(gcp): add pub visibility and fix borrow errors in gcp_storage.rs#7

Open
ayuxsh009 wants to merge 1 commit intoc2siorg:mainfrom
ayuxsh009:fix/gcp-storage-compilation
Open

fix(gcp): add pub visibility and fix borrow errors in gcp_storage.rs#7
ayuxsh009 wants to merge 1 commit intoc2siorg:mainfrom
ayuxsh009:fix/gcp-storage-compilation

Conversation

@ayuxsh009
Copy link

Closes #6

Summary

This PR fixes build failures in the GCP storage module caused by visibility issues and borrow checker violations.


Problem

The project failed to compile due to the following errors:

  • E0425 / E0433
    GoogleStorage was not accessible from test modules because it lacked pub visibility.

  • E0716
    Temporary Value::String values were dropped while still borrowed during HashMap insertion.

These errors prevented successful compilation and test execution.


Changes Made

Visibility Fixes

  • Made GoogleStorage struct public
  • Made new() constructor public
  • Made create_disk() method public

Borrow Checker Fix

  • Stored formatted values in local bindings before inserting into the HashMap
  • Ensured values live long enough to satisfy Rust’s borrow checker

Testing

  • Ran cargo build → success
  • Verified tests compile and run correctly
  • No regressions observed

Copilot AI review requested due to automatic review settings February 17, 2026 19:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes compilation errors in the GCP storage module by adding public visibility modifiers and resolving borrow checker violations. The changes enable the GoogleStorage struct and its methods to be accessible from test modules while ensuring that temporary values live long enough during HashMap construction.

Changes:

  • Added pub visibility modifiers to GoogleStorage struct and its methods (new, create_disk, delete_disk, create_snapshot)
  • Fixed borrow checker errors by storing formatted string values in local variables before inserting references into the HashMap

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: GCP Storage API fails to compile due to visibility and borrow checker errors

1 participant