Skip to content

Commit

Permalink
[framework] make object api consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
davidiw committed Feb 15, 2023
1 parent 2e564d8 commit 80f302d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions aptos-move/framework/aptos-framework/doc/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ Derives an object address from source material: sha3_256([creator address | seed
Returns the address of within an ObjectId.


<pre><code><b>public</b> <b>fun</b> <a href="object.md#0x1_object_object_address">object_address</a>&lt;T&gt;(<a href="object.md#0x1_object">object</a>: &<a href="object.md#0x1_object_Object">object::Object</a>&lt;T&gt;): <b>address</b>
<pre><code><b>public</b> <b>fun</b> <a href="object.md#0x1_object_object_address">object_address</a>&lt;T: key&gt;(<a href="object.md#0x1_object">object</a>: &<a href="object.md#0x1_object_Object">object::Object</a>&lt;T&gt;): <b>address</b>
</code></pre>


Expand All @@ -588,7 +588,7 @@ Returns the address of within an ObjectId.
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="object.md#0x1_object_object_address">object_address</a>&lt;T&gt;(<a href="object.md#0x1_object">object</a>: &<a href="object.md#0x1_object_Object">Object</a>&lt;T&gt;): <b>address</b> {
<pre><code><b>public</b> <b>fun</b> <a href="object.md#0x1_object_object_address">object_address</a>&lt;T: key&gt;(<a href="object.md#0x1_object">object</a>: &<a href="object.md#0x1_object_Object">Object</a>&lt;T&gt;): <b>address</b> {
<a href="object.md#0x1_object">object</a>.inner
}
</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/framework/aptos-framework/sources/object.move
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ module aptos_framework::object {
native fun exists_at<T: key>(object: address): bool;

/// Returns the address of within an ObjectId.
public fun object_address<T>(object: &Object<T>): address {
public fun object_address<T: key>(object: &Object<T>): address {
object.inner
}

Expand Down

0 comments on commit 80f302d

Please sign in to comment.