Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@arik-so
Copy link
Contributor

@arik-so arik-so commented Feb 2, 2023

Currently, Scalar types do not implement the Debug trait, whereas most other types in the library do. Besides that being an upstream requirement for us, I believe it would also be quite useful for users of that type.

Also implements the Index traits for Scalar.

@apoelstra
Copy link
Member

This looks good to me, but could you run cargo +nightly fmt on it? It won't pass CI otherwise.

@arik-so arik-so force-pushed the make-scalars-debuggable branch from 62095f4 to 8ed8cac Compare February 2, 2023 17:34
@arik-so
Copy link
Contributor Author

arik-so commented Feb 2, 2023

Sure, done!

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 8ed8cac

@apoelstra apoelstra merged commit 8603719 into rust-bitcoin:master Feb 2, 2023
// Internal represenation is big endian to match what `libsecp256k1` uses.
// Also easier to implement comparison.
// Debug impl omitted for now, the bytes may be secret
#[allow(missing_debug_implementations)]
Copy link
Member

Choose a reason for hiding this comment

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

This line could have been removed in this patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm happy to open a followup PR. Shall I?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went ahead and did to save time: #579. If it's just a nuisance PR due to its size, I'm happy to close it.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks man!

chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
…calar` type

8ed8cac2fee9ec4f809b87fb8f5fa94d58d8b895 Implement `Debug` trait for `Scalar` type. (Arik Sosman)

Pull request description:

  Currently, `Scalar` types do not implement the `Debug` trait, whereas most other types in the library do. Besides that being an upstream requirement for us, I believe it would also be quite useful for users of that type.

  Also implements the `Index` traits for `Scalar`.

ACKs for top commit:
  apoelstra:
    ACK 8ed8cac2fee9ec4f809b87fb8f5fa94d58d8b895

Tree-SHA512: f254859144850e40badf6ace2b2a1b231e5ed224ec60861586cd5f2042167d89c759dc16a1075702bce90d810ac60db924ea8cb20d82099a42fddb2718da12db
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
…calar` type

8ed8cac2fee9ec4f809b87fb8f5fa94d58d8b895 Implement `Debug` trait for `Scalar` type. (Arik Sosman)

Pull request description:

  Currently, `Scalar` types do not implement the `Debug` trait, whereas most other types in the library do. Besides that being an upstream requirement for us, I believe it would also be quite useful for users of that type.

  Also implements the `Index` traits for `Scalar`.

ACKs for top commit:
  apoelstra:
    ACK 8ed8cac2fee9ec4f809b87fb8f5fa94d58d8b895

Tree-SHA512: f254859144850e40badf6ace2b2a1b231e5ed224ec60861586cd5f2042167d89c759dc16a1075702bce90d810ac60db924ea8cb20d82099a42fddb2718da12db
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.

3 participants